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.
libsvm/libsvm.spec

320 lines
9.9 KiB

18 years ago
Name: libsvm
16 years ago
Version: 2.88
Release: 1%{?dist}
18 years ago
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
17 years ago
Source3: libsvm-svm-toy-gtk.desktop
Source4: libsvm-svm-toy-qt.desktop
Source5: LibSVM-svm-toy-48.png
Patch0: %{name}-%{version}.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
18 years ago
%{!?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
%{!?qt3-devel: }
18 years ago
%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
18 years ago
Group: Development/Libraries
BuildRequires: glibc-devel gawk
18 years ago
Requires: %{name} = %{version}-%{release}
%description devel
Header file, object file of libsvm in C, C++ and Java.
18 years ago
Install this package if you want to develop programs with libsvm.
18 years ago
%package python
Summary: Python tools and interfaces for libsvm
18 years ago
Group: Development/Libraries
17 years ago
BuildRequires: python-devel >= 2.4 gawk
#gnuplot is required by easy.py
18 years ago
Requires: %{name} = %{version}-%{release}
17 years ago
Requires: gnuplot
18 years ago
%description python
Python tools and interfaces for libsvm.
Install this package if you want to develop
18 years ago
programs with libsvm in Python.
%package java
Summary: Java tools and interfaces for libsvm
Group: Development/Libraries
# javadoc in java-1.5.0-gcj-devel-1.5.0.0-18 is bad.
BuildRequires: java-sdk >= 0:1.5.0.0-21
Requires: jre >= 0:1.5.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.
16 years ago
Install libsvm-javadoc for
%package svm-toy-gtk
Summary: GTK version of svm-toy (libsvm demostration program)
Group: Development/Libraries
BuildRequires: gtk2-devel
17 years ago
BuildRequires: desktop-file-utils
Requires: 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
17 years ago
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig
16 years ago
BuildRequires: qt4-devel
Requires: qt4
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.
18 years ago
%prep
%setup -q
18 years ago
%patch0 -p0 -b .bak
17 years ago
cp %{SOURCE1} ChangeLog
cp %{SOURCE2} .
cp %{SOURCE3} .
cp %{SOURCE4} .
cp %{SOURCE5} %{name}-svm-toy-gtk-48.png
cp %{SOURCE5} %{name}-svm-toy-qt-48.png
17 years ago
18 years ago
%build
%{__sed} -i 's/\r//' FAQ.html
%{__sed} -i 's/\r//' ChangeLog
16 years ago
make all RPM_CFLAGS="$RPM_OPT_FLAGS" PYTHON_VERSION="%{pyver}" JAVAC="%{javac}" JAR="%{jar}" LIBDIR="%{_libdir}"
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
18 years ago
%install
rm -rf $RPM_BUILD_ROOT
16 years ago
make install DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} PYTHON_VERSION="%{pyver}" LIBSVM_VER="%{version}"
ln -sf %{name}.so.1 ${RPM_BUILD_ROOT}%{_libdir}/%{name}.so
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/src
17 years ago
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/48x48/apps/
cp %{name}-svm-toy-gtk-48.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/48x48/apps/
cp %{name}-svm-toy-qt-48.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/48x48/apps/
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications
cp %{name}-svm-toy-gtk.desktop $RPM_BUILD_ROOT/%{_datadir}/applications
cp %{name}-svm-toy-qt.desktop $RPM_BUILD_ROOT/%{_datadir}/applications
17 years ago
desktop-file-install --delete-original --vendor=fedora \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \
${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop \
17 years ago
18 years ago
%post -p /sbin/ldconfig
17 years ago
%post svm-toy-gtk
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%postun -p /sbin/ldconfig
17 years ago
%postun svm-toy-gtk
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
18 years ago
%clean
rm -rf $RPM_BUILD_ROOT
18 years ago
%files
%defattr(-,root,root,-)
%doc COPYRIGHT FAQ.html ChangeLog guide.pdf
18 years ago
%{_bindir}/svm-predict
%{_bindir}/svm-scale
%{_bindir}/svm-train
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/examples
16 years ago
%{_libdir}/%{name}.so.1
18 years ago
%files devel
%defattr(-,root,root,-)
18 years ago
%doc README
%{_includedir}/%{name}/
%{_libdir}/%{name}.so
18 years ago
%files python
%defattr(-,root,root,-)
18 years ago
%doc python/README-Python tools/README-Tools
%{libsvm_python_dir}
%files java
%defattr(-,root,root,-)
16 years ago
%doc java/README-Java
%{_datadir}/%{name}/java
16 years ago
%{_datadir}/javadoc/%{name}-%{version}
18 years ago
%files svm-toy-gtk
%defattr(-,root,root,-)
%doc svm-toy/gtk/README
%{_bindir}/svm-toy-gtk
%{_datadir}/icons/hicolor/48x48/apps/%{name}-svm-toy-gtk-48.png
%{_datadir}/applications/fedora-%{name}-svm-toy-gtk.desktop
%files svm-toy-qt
%defattr(-,root,root,-)
%doc svm-toy/qt/README
%{_bindir}/svm-toy-qt
%{_datadir}/icons/hicolor/48x48/apps/%{name}-svm-toy-qt-48.png
%{_datadir}/applications/fedora-%{name}-svm-toy-qt.desktop
18 years ago
%changelog
* Mon Nov 10 2008 Ding-Yi Chen <dchen@redhat.com> - 2.88-1
- Fix java BuildRequire and Build
16 years ago
* Wed Nov 05 2008 Ding-Yi Chen <dchen@redhat.com> - 2.88-0
- Note:
+ SO version now follows upstream, i.e. SHVER=1, as upstream start to build shared library now.
Be aware that previously SO version of libsvm.so is libsvm.so.2.86, which looks higher than
the current SO version libsvm.so.1.
+ Replaced java-1.5.0-gcj-devel with java-1.6.0-openjdk-devel.
+ java sub-package now have javadoc.
- Upstream update
+ From 2.87: 2008/10/13
* svm-toy/qt updated to qt4 from qt3
* fix a bug in svm-scale.c
* max feature index of -r file is considered
* Makefile: add make lib; add -Wconversion and -fPIC in Makefile
* Add "rb" in load_model of svm.cpp
* Simplify do_shrinking of svm.cpp
* Change the order of loops in reconstrict_gradient of svm.cpp
* save the number of kernel evaluations
* Add python/setup.py
+ From 2.88: 2008/10/30
* better gradient reconstructions
* issue a warning when -h 0 may be faster
* Thu Apr 29 2008 Ding-Yi Chen <dchen@redhat.com> - 2.86-13
- Fix svm-toy-qt clear button does not clear.
(from Hsiang-Fu Yu in National Taiwan University)
* Thu Apr 3 2008 Ding-Yi Chen <dchen@redhat.com> - 2.86-12
- Correct changelog date
* Thu Apr 3 2008 Ding-Yi Chen <dchen@redhat.com> - 2.86-11
17 years ago
- Fix the Qt path problem
* Wed Apr 2 2008 Ding-Yi Chen <dchen@redhat.com> - 2.86-4
- Support both Qt3 for F8 and earlier, and Qt4 for F9
* Tue Apr 1 2008 Ding-Yi Chen <dchen@redhat.com> - 2.86-0
- Upstream update to 2.86
- svm-scale for java
- version number in svm.h and svm.m4
- rename svmtrain.exe to svm-train.exe
- python: while 1 --> while True, Popen -> call
- show best parameters on the contour of grid.py
- LIBSVM_VER_MAJOR and LIBSVM_VER_MINOR are defined in libsvm.spec instead in
* Tue Mar 11 2008 Ding-Yi Chen <dchen@redhat.com> - 2.85-6
- Fix build error.
* Mon Mar 10 2008 Ding-Yi Chen <dchen@redhat.com> - 2.85-5
17 years ago
- [Bug 436392]: Fix by copy from right place.
- Add desktop files and icons for svm-toy-gtk and svm-toy-qt
* Tue Feb 11 2008 Ding-Yi Chen <dchen@redhat.com> - 2.85-4
- Move gnuplot from BuildRequires to Requires
* Thu Feb 07 2008 Ding-Yi Chen <dchen@redhat.com> - 2.85-3
- Fix linker name (libsvm.so)
- Linked to dynamic libraries
* Tue Feb 05 2008 Ding-Yi Chen <dchen@redhat.com> - 2.85-2
- Fix svm-toy-qt build error
* Tue Feb 05 2008 Ding-Yi Chen <dchen@redhat.com> - 2.85-1
- Fix svm-toy-gtk build error
17 years ago
* 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
18 years ago
* 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