diff --git a/README.md b/README.md new file mode 100644 index 0000000..4358961 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# libsvm + +[LIBSVM](https://www.csie.ntu.edu.tw/~cjlin/libsvm/) is integrated software for +support vector classification (C-SVC, nu-SVC ), regression (epsilon-SVR, +nu-SVR) and distribution estimation (one-class SVM ). It supports multi-class +classification. diff --git a/libsvm.spec b/libsvm.spec index 2af6fc3..e670f81 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -35,9 +35,9 @@ Patch4: %{name}.toolsDir.patch Patch5: %{name}.svm-toy-qt5.patch %description -LIBSVM is an integrated software for support vector classification, -(C-SVC, nu-SVC ), regression (epsilon-SVR, nu-SVR) and distribution -estimation (one-class SVM ). It supports multi-class classification. +LIBSVM is integrated software for support vector classification (C-SVC, +nu-SVC ), regression (epsilon-SVR, nu-SVR) and distribution estimation +(one-class SVM ). It supports multi-class classification. %package devel Summary: Development files for libsvm in C, C++ and Java @@ -52,15 +52,16 @@ Install this package if you want to develop programs with libsvm. %package -n python3-%{name} Summary: Python3 tools and interfaces for libsvm BuildRequires: python3-devel +BuildRequires: %{py3_dist pip} BuildRequires: %{py3_dist scipy} BuildRequires: %{py3_dist setuptools} +BuildRequires: %{py3_dist wheel} #gnuplot is required by easy.py Requires: gnuplot %description -n python3-%{name} -Python3 tools and interfaces for libsvm. -Install this package if you want to develop -programs with libsvm in Python3. +Python3 tools and interfaces for libsvm. Install this package if you +want to develop programs with libsvm in Python3. %package java Summary: Java tools and interfaces for libsvm @@ -141,6 +142,9 @@ sed -i.orig 's/\r//' FAQ.html touch -r FAQ.html.orig FAQ.html rm FAQ.html.orig +# Fix shebangs +%py3_shebang_fix python/libsvm tools + %build # Build the library make all RPM_CFLAGS="$RPM_OPT_FLAGS" LIBDIR="%{_libdir}" CPP_STD="%{cpp_std}" @@ -158,7 +162,7 @@ cd - # Build the python interface cd python -%py3_build +%pyproject_wheel cd - %install @@ -172,16 +176,11 @@ ln -s %{name}.so.%{shver} %{buildroot}%{_libdir}/%{name}.so # Python cd python -%py3_install +%pyproject_install cd - -install -p -m 755 tools/*.py %{buildroot}%{python3_libsvm_dir} -for p in %{buildroot}%{python3_libsvm_dir}/*.py; do - sed -i.orig -e 's|#!/usr/bin/env python|#!%{python3}|' $p - touch -r $p.orig $p - rm $p.orig -done cd tools for p in *.py; do + install -p -m 755 *.py %{buildroot}%{python3_libsvm_dir} ln -s %{python3_libsvm_dir}/$p %{buildroot}%{_bindir}/svm-$p done cd - @@ -250,7 +249,7 @@ cp -p README java/README-Java %files -n python3-%{name} %doc python/README-Python tools/README-Tools %{python3_libsvm_dir}/ -%{python3_sitearch}/libsvm*.egg-info/ +%{python3_sitearch}/libsvm*.dist-info/ %{_bindir}/svm-*.py %files java -f .mfiles