You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
211 lines
5.9 KiB
211 lines
5.9 KiB
Name: libsvm
|
|
Version: 2.85
|
|
Release: 0%{?dist}
|
|
Summary: A Library for Support Vector Machines
|
|
|
|
Group: Development/Libraries
|
|
License: BSD
|
|
URL: http://www.csie.ntu.edu.tw/~cjlin/libsvm/
|
|
Source0: %{name}-%{version}.tar.gz
|
|
#Source0: http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu.edu.tw/~cjlin/%{name}+tar.gz
|
|
Source1: http://www.csie.ntu.edu.tw/~cjlin/libsvm/log
|
|
Source2: http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf
|
|
Patch0: %{name}-%{version}.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
|
%define libsvm_ver_major 2
|
|
%{!?pyver: %define pyver %(python -c 'import sys; print(sys.version[0:3])')}
|
|
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
%define libsvm_python_dir %{python_sitearch}/libsvm
|
|
|
|
%define javac javac
|
|
%define jar jar
|
|
%define libdir_libsvm %{_libdir}/libsvm
|
|
|
|
|
|
%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.
|
|
|
|
%package devel
|
|
Summary: Header file, object file, and source files of libsvm in C, C++ and Java
|
|
Group: Development/Libraries
|
|
BuildRequires: glibc-devel
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description devel
|
|
Header file, object file of libsvm in C, C++ and Java.
|
|
Install this package if you want to develop programs with libsvm.
|
|
|
|
|
|
%package python
|
|
Summary: Python tools and interfaces for libsvm
|
|
Group: Development/Libraries
|
|
BuildRequires: python-devel >= 2.4 gawk gnuplot
|
|
#gnuplot is required by easy.py
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description python
|
|
Python tools and interfaces for libsvm.
|
|
Install this package if you want to develop
|
|
programs with libsvm in Python.
|
|
|
|
%package java
|
|
Summary: Java tools and interfaces for libsvm
|
|
Group: Development/Libraries
|
|
BuildRequires: java-1.5.0-gcj-devel >= 1.5.0.0
|
|
#Client doesn't necessory use gcj
|
|
#Requires: java-1.5.0-gcj >= 1.5.0.0
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description java
|
|
Java tools and interfaces for libsvm.
|
|
Install this package if you want to develop
|
|
programs with libsvm in Java.
|
|
|
|
%package svm-toy-gtk
|
|
Summary: GTK version of svm-toy (libsvm demostration program)
|
|
Group: Development/Libraries
|
|
BuildRequires: gtk2-devel
|
|
BuildRequires: gtk2
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description svm-toy-gtk
|
|
svm-toy is a libsvm demostration program which has a gtk-GUI to
|
|
display the derived separating hyperplane.
|
|
|
|
%package svm-toy-qt
|
|
Summary: QT version of svm-toy (libsvm demostration program)
|
|
Group: Development/Libraries
|
|
BuildRequires: qt-devel
|
|
BuildRequires: qt
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description svm-toy-qt
|
|
svm-toy is a libsvm demostration program which has a qt-GUI to
|
|
display the derived separating hyperplane.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0 -p0 -b .bak
|
|
cp ../../SOURCES/log ChangeLog
|
|
cp ../../SOURCES/guide.pdf .
|
|
|
|
|
|
%build
|
|
make all CFLAGS="$RPM_OPT_FLAGS" PYTHON_VERSION="%{pyver}" JAVAC="%{javac}" JAR="%{jar}"
|
|
%{__sed} -i 's/\r//' FAQ.html
|
|
%{__sed} -i 's/\r//' ChangeLog
|
|
mv python/README python/README-Python
|
|
mv tools/README tools/README-Tools
|
|
cp README java/README-Java
|
|
cp README svm-toy/gtk
|
|
cp README svm-toy/qt
|
|
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
make install DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} PYTHON_VERSION="%{pyver}"
|
|
#cd ${RPM_BUILD_ROOT}%{libdir_libsvm}; ln -sf %{name}.so.%{version} %{name}.so
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/src
|
|
|
|
|
|
%post
|
|
/sbin/ldconfig %{libdir_libsvm}
|
|
|
|
%postun
|
|
/sbin/ldconfig %{libdir_libsvm}
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc COPYRIGHT FAQ.html ChangeLog guide.pdf
|
|
%{_bindir}/svm-predict
|
|
%{_bindir}/svm-scale
|
|
%{_bindir}/svm-train
|
|
%dir %{_datadir}/%{name}
|
|
%{_datadir}/%{name}/examples
|
|
%dir %{libdir_libsvm}
|
|
%{libdir_libsvm}/%{name}.so.%{version}
|
|
%{libdir_libsvm}/%{name}.so.%{libsvm_ver_major}
|
|
|
|
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
%doc README
|
|
%{_includedir}/%{name}/
|
|
#%{libdir_libsvm}/%{name}.so
|
|
|
|
%files python
|
|
%defattr(-,root,root,-)
|
|
%doc python/README-Python tools/README-Tools
|
|
%{libsvm_python_dir}
|
|
|
|
%files java
|
|
%defattr(-,root,root,-)
|
|
%doc java/README-Java
|
|
%{_datadir}/%{name}/java
|
|
#%{_datadir}/javadoc/%{name}-%{version}
|
|
|
|
%files svm-toy-gtk
|
|
%defattr(-,root,root,-)
|
|
%doc svm-toy/gtk/README
|
|
%{_bindir}/svm-toy-gtk
|
|
|
|
%files svm-toy-qt
|
|
%defattr(-,root,root,-)
|
|
%doc svm-toy/qt/README
|
|
%{_bindir}/svm-toy-qt
|
|
|
|
|
|
%changelog
|
|
* Mon Feb 04 2008 Ding-Yi Chen <dchen@redhat.com> - 2.85-0
|
|
- Upgrade to 2.85
|
|
- Include guide.pdf in main package
|
|
- Change the dependent from eclipse-ecj to java-1.5.0-gcj
|
|
- Add svm-toy-gtk
|
|
- Add svm-toy-qt
|
|
|
|
* Wed Dec 20 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-9
|
|
- [Bug 254091] Comment 19
|
|
- Fix python/Makefile
|
|
|
|
* Thu Dec 13 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-8
|
|
- Fix improper sed.
|
|
- Change ldconfig to /sbin/ldconfig
|
|
- Add gnuplot dependency for libsvm-python, as tools/easy.py needs it.
|
|
|
|
* Mon Dec 03 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-7
|
|
- [Bug 254091] Review Request: libsvm - A Library for Support Vector Machines (Comment #12)
|
|
|
|
* Thu Sep 26 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-6
|
|
- Add defattr to each subpackage
|
|
- Move libsvm.so to libsvm
|
|
|
|
* Thu Sep 24 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-5
|
|
- Split out libsvm-java
|
|
- Add libsvm.so
|
|
|
|
* Thu Aug 30 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-4
|
|
- Refined description.
|
|
- Fix the /tmp/python.ver problem
|
|
|
|
* Mon Aug 27 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-3
|
|
- Fix dependency problem
|
|
|
|
* Mon Aug 27 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-2
|
|
- Fix mock error
|
|
- Support Python 2.4 and Python 2.5
|
|
|
|
* Mon Aug 27 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-1
|
|
- Fix rpmlint error
|
|
- Move python related files to libsvm-python
|
|
|
|
* Fri Aug 17 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-0
|
|
- initial packaging
|
|
|