2014-03-13 15:11:49 +00:00
|
|
|
#
|
|
|
|
# spec file for package libsvm
|
|
|
|
#
|
2019-07-05 20:46:29 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-03-13 15:11:49 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-07-05 20:46:29 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-03-13 15:11:49 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Summary: A Library for Support Vector Machines
|
|
|
|
License: BSD-3-Clause
|
2016-09-12 20:19:12 +00:00
|
|
|
Group: Development/Languages/Other
|
2014-03-13 15:11:49 +00:00
|
|
|
Name: libsvm
|
2019-09-11 21:10:13 +00:00
|
|
|
Version: 3.24
|
2014-03-13 15:11:49 +00:00
|
|
|
Release: 0
|
2019-09-11 21:10:13 +00:00
|
|
|
URL: https://www.csie.ntu.edu.tw/~cjlin/libsvm/
|
2019-07-05 20:46:29 +00:00
|
|
|
Source0: https://www.csie.ntu.edu.tw/~cjlin/libsvm/%{name}-%{version}.tar.gz
|
2014-03-13 15:11:49 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
2016-09-12 20:19:12 +00:00
|
|
|
BuildRequires: java-devel
|
2019-07-05 20:46:29 +00:00
|
|
|
BuildRequires: javapackages-tools
|
|
|
|
BuildRequires: ncurses-devel
|
2016-09-12 20:19:12 +00:00
|
|
|
BuildRequires: python-devel
|
2014-03-13 15:11:49 +00:00
|
|
|
|
|
|
|
%description
|
2016-09-12 20:19:12 +00:00
|
|
|
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.
|
|
|
|
|
|
|
|
%package -n svm-tools
|
|
|
|
Summary: A set of tools to use with libsvm
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
|
|
|
|
%description -n svm-tools
|
|
|
|
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.
|
2014-03-13 15:11:49 +00:00
|
|
|
|
|
|
|
%package -n libsvm2
|
|
|
|
Summary: A Library for Support Vector Machines
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libsvm2
|
2016-09-12 20:19:12 +00:00
|
|
|
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.
|
2014-03-13 15:11:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: C headers for developing programs with libsvm
|
2016-09-12 20:19:12 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: libsvm2 = %{version}
|
2019-09-11 21:10:13 +00:00
|
|
|
# VPP provides a libsvm.so installed in _libdir as well
|
2019-09-11 22:14:50 +00:00
|
|
|
Conflicts: vpp-devel
|
2014-03-13 15:11:49 +00:00
|
|
|
|
|
|
|
%description devel
|
2016-09-12 20:19:12 +00:00
|
|
|
This package contains the libraries and header files needed for
|
|
|
|
developing applications with libsvm.
|
2014-03-13 15:11:49 +00:00
|
|
|
|
|
|
|
%package -n python-svm
|
2019-07-07 08:51:58 +00:00
|
|
|
Summary: Python bindings for libsvm
|
2016-09-12 20:19:12 +00:00
|
|
|
Group: Development/Languages/Python
|
2014-03-13 15:11:49 +00:00
|
|
|
Requires: gnuplot
|
2016-09-12 20:19:12 +00:00
|
|
|
Requires: svm-tools = %{version}
|
2014-03-13 15:11:49 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description -n python-svm
|
2019-07-07 08:51:58 +00:00
|
|
|
This package contains the Python bindings for libsvm.
|
2014-03-13 15:11:49 +00:00
|
|
|
|
2016-09-12 20:19:12 +00:00
|
|
|
%package java
|
2019-07-07 08:51:58 +00:00
|
|
|
Summary: Java bindings for libsvm
|
2016-09-12 20:19:12 +00:00
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: java >= 1.6.0
|
|
|
|
Requires: javapackages-tools
|
2019-07-05 20:46:29 +00:00
|
|
|
Requires: libsvm2 = %{version}
|
2016-09-12 20:19:12 +00:00
|
|
|
Requires(post): javapackages-tools
|
|
|
|
Requires(postun): javapackages-tools
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description java
|
2019-07-07 08:51:58 +00:00
|
|
|
This package contains the Java bindings for libsvm.
|
2014-03-13 15:11:49 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="%{optflags} -Wconversion -fPIC"
|
|
|
|
make
|
|
|
|
make all
|
|
|
|
make lib
|
2016-09-12 20:19:12 +00:00
|
|
|
rm -f java/libsvm.jar
|
|
|
|
make -C java
|
2014-03-13 15:11:49 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
2016-09-12 20:19:12 +00:00
|
|
|
mkdir -p %{buildroot}%{_javadir}
|
2014-03-13 15:11:49 +00:00
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
|
|
|
mkdir -p %{buildroot}%{_includedir}/libsvm
|
|
|
|
mkdir -p %{buildroot}%{python_sitelib}/svm
|
|
|
|
|
|
|
|
install -m 755 svm-train %{buildroot}%{_bindir}
|
|
|
|
install -m 755 svm-scale %{buildroot}%{_bindir}
|
|
|
|
install -m 755 svm-predict %{buildroot}%{_bindir}
|
|
|
|
install -m 755 ./tools/checkdata.py %{buildroot}%{_bindir}/svm-checkdata
|
|
|
|
install -m 755 ./tools/grid.py %{buildroot}%{_bindir}/svm-grid
|
|
|
|
install -m 755 ./tools/subset.py %{buildroot}%{_bindir}/svm-subset
|
|
|
|
install -m 755 ./tools/easy.py %{buildroot}%{_bindir}/svm-easy
|
|
|
|
install -m 644 svm.h %{buildroot}%{_includedir}/libsvm/
|
|
|
|
install -m 755 libsvm.so.2 %{buildroot}%{_libdir}
|
|
|
|
ln -s %{_libdir}/libsvm.so.2 %{buildroot}%{_libdir}/libsvm.so
|
|
|
|
mv ./python/README README-python
|
|
|
|
mv ./tools/README README-python-tools
|
|
|
|
|
|
|
|
install -m 755 ./python/svm.py %{buildroot}%{python_sitelib}/svm
|
|
|
|
install -m 755 ./python/svmutil.py %{buildroot}%{python_sitelib}/svm
|
|
|
|
touch %{buildroot}%{python_sitelib}/svm/__init__.py
|
|
|
|
|
2016-09-12 20:19:12 +00:00
|
|
|
install -m 755 ./java/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
2014-03-13 15:11:49 +00:00
|
|
|
|
2016-09-12 20:19:12 +00:00
|
|
|
%fdupes -s %{buildroot}
|
2014-03-13 15:11:49 +00:00
|
|
|
|
|
|
|
%post -n libsvm2 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libsvm2 -p /sbin/ldconfig
|
|
|
|
|
2016-09-12 20:19:12 +00:00
|
|
|
%files -n svm-tools
|
2014-03-13 15:11:49 +00:00
|
|
|
%doc FAQ.html README
|
|
|
|
%{_bindir}/svm-train
|
|
|
|
%{_bindir}/svm-scale
|
|
|
|
%{_bindir}/svm-predict
|
|
|
|
|
|
|
|
%files -n libsvm2
|
2014-04-05 15:28:10 +00:00
|
|
|
%doc COPYRIGHT
|
2014-03-13 15:11:49 +00:00
|
|
|
%{_libdir}/libsvm.so.2
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_includedir}/libsvm
|
|
|
|
%{_libdir}/libsvm.so
|
|
|
|
|
|
|
|
%files -n python-svm
|
|
|
|
%doc README-python README-python-tools
|
|
|
|
%{_bindir}/svm-checkdata
|
|
|
|
%{_bindir}/svm-grid
|
|
|
|
%{_bindir}/svm-subset
|
|
|
|
%{_bindir}/svm-easy
|
|
|
|
%{python_sitelib}/svm
|
|
|
|
|
2016-09-12 20:19:12 +00:00
|
|
|
%files java
|
|
|
|
%{_javadir}/%{name}.jar
|
|
|
|
|
2014-03-13 15:11:49 +00:00
|
|
|
%changelog
|