Name: libsvm Version: 3.25 Release: 1mamba Summary: A simple, easy-to-use, and efficient software for SVM classification and regression Group: Development/Libraries Vendor: openmamba Distribution: openmamba Packager: Davide Madrisan URL: https://www.csie.ntu.edu.tw/~cjlin/libsvm ## GITSOURCE https://github.com/cjlin1/libsvm.git v320 Source: https://github.com/cjlin1/libsvm.git/v320/libsvm-%{version}.tar.bz2 Patch0: libsvm-3.20-Makefile.patch License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libgcc #BuildRequires: libpython-devel BuildRequires: libstdc++6-devel ## AUTOBUILDREQ-END BuildRequires: gcc-c++ # FIXME # build the java bindings, svm-toy-gtk, and svm-toy-qt %description Libsvm is a simple, easy-to-use, and efficient software for SVM classification and regression. It solves C-SVM classification, nu-SVM classification, one-class-SVM, epsilon-SVM regression, and nu-SVM regression. It also provides an automatic model selection tool for C-SVM classification. %package devel Group: Development/Libraries Summary: Development files for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: pkg-config %description devel This package contains libraries and header files for developing applications that use %{name}. %package -n python-%{name} Group: Development/Libraries/Python Summary: Python bindings for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: python %description -n python-%{name} %{summary}. %prep %setup -q %patch0 -p1 # add pkg-config file cat << _EOF >> %{name}.pc Name: %{name} Description: Library for SVM classification and regression URL: %{url} Version: 3.25 prefix=%{_prefix} includedir=%{_includedir} Cflags: -I\${includedir}/libsvm Libs: -lsvm _EOF %build CFLAGS="%optflags -O3"; export CFLAGS %make all python -m compileall -l python python -m compileall -l tools %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}%{_bindir} install -m 0755 svm-train %{buildroot}%{_bindir}/ install -m 0755 svm-predict %{buildroot}%{_bindir}/ install -m 0755 svm-scale %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{_libdir} install libsvm.so* %{buildroot}%{_libdir}/ mkdir -p %{buildroot}%{_libdir}/pkgconfig install -m 0644 %{name}.pc %{buildroot}%{_libdir}/pkgconfig/ mkdir -p %{buildroot}%{_includedir}/%{name} install -m 0644 svm.h %{buildroot}%{_includedir}/%{name}/ mkdir -p %{buildroot}%{python_sitearch}/%{name} install -m 0644 python/*.py* tools/*.py* %{buildroot}%{python_sitearch}/%{name}/ > %{buildroot}%{python_sitearch}/%{name}/__init__.py for f in python/*.py tools/*.py; do ln -s %{python_sitearch}/%{name}/${f/*\/} %{buildroot}%{_bindir}/svm-${f/*\/} done %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %{_bindir}/svm-predict %{_bindir}/svm-scale %{_bindir}/svm-train %{_libdir}/*.so.* %files devel %defattr(-,root,root) %{_includedir}/%{name} %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %doc README %files -n python-%{name} %defattr(-,root,root) %{_bindir}/svm-*.py %{python_sitearch}/%{name} %changelog * Thu Apr 15 2021 Automatic Build System 3.25-1mamba - automatic version update by autodist * Tue Feb 09 2021 Automatic Build System 3.24-1mamba - automatic version update by autodist * Sun Mar 22 2015 Davide Madrisan 3.20-1mamba - package created by autospec