Name: libsvm Version: 2.84 Release: 3%{?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: ChangeLog #Source1: http://www.csie.ntu.edu.tw/~cjlin/libsvm/log Patch0: libsvm-2.84-2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: glibc-devel dos2unix Requires: glibc %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: A Library for Support Vector Machines Group: Development/Libraries BuildRequires: glibc-devel Requires: glibc Requires: %{name} = %{version}-%{release} %description devel The libsvm-devel package includes the header file, object file, and soucre in C and Java. Install this package if you want to develop programs with libsvm. %package python Summary: A Library for Support Vector Machines Group: Development/Libraries BuildRequires: python >= 2.4 python-devel >= 2.4 gawk Requires: python >= 2.4 Requires: %{name} = %{version}-%{release} %description python The libsvm-python provides tools and interface written in python, as well as source code. Install this package if you want to develop programs with libsvm in Python. %prep %setup -q %patch0 -p0 -b .bak %define temp_file /tmp/python.ver %define python_version %(python -V 2> %{temp_file} ; cat %{temp_file} | awk 'BEGIN {FS= "[ .]"} {printf("%s.%s",$2,$3)}'; rm -f %{temp_file}) %define libsvm_python_dir %{_libdir}/python%{python_version}/site-packages/libsvm %build make all DESTDIR=%{_builddir} LIBDIR=%{_libdir} dos2unix -o %{_builddir}/%{name}-%{version}/FAQ.html mv %{_builddir}/%{name}-%{version}/python/README %{_builddir}/%{name}-%{version}/python/README-Python mv %{_builddir}/%{name}-%{version}/tools/README %{_builddir}/%{name}-%{version}/tools/README-Tools %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYRIGHT FAQ.html %{_bindir}/svm-predict %{_bindir}/svm-scale %{_bindir}/svm-train %{_datadir}/libsvm/examples %files devel %doc README %{_libdir}/libsvm %{_includedir}/libsvm %{_datadir}/libsvm/src %files python %doc python/README-Python tools/README-Tools %{libsvm_python_dir} %changelog * Mon Aug 27 2007 Ding-Yi Chen - 2.84-3 - Fix dependency problem * Mon Aug 27 2007 Ding-Yi Chen - 2.84-2 - Fix mock error - Support Python 2.4 and Python 2.5 * Mon Aug 27 2007 Ding-Yi Chen - 2.84-1 - Fix rpmlint error - Move python related files to libsvm-python * Fri Aug 17 2007 Ding-Yi Chen - 2.84-0 - initial packaging