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

145 lines
4.2 KiB

18 years ago
Name: libsvm
Version: 2.84
Release: 7%{?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: ChangeLog
#Source1: http://www.csie.ntu.edu.tw/~cjlin/libsvm/log
Patch0: libsvm-2.84-7.patch
#BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
18 years ago
BuildRequires: glibc-devel dos2unix
%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
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
BuildRequires: python-devel >= 2.4 gawk
18 years ago
Requires: %{name} = %{version}-%{release}
%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
BuildRequires: eclipse-ecj >= 3
Requires: eclipse-ecj >= 3
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.
18 years ago
%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
cp %{_builddir}/%{name}-%{version}/README %{_builddir}/%{name}-%{version}/java/README-Java
18 years ago
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir}
ldconfig -n %{_libdir}/libsvm
18 years ago
18 years ago
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc COPYRIGHT FAQ.html
%{_bindir}/svm-predict
%{_bindir}/svm-scale
%{_bindir}/svm-train
%dir %{_datadir}/libsvm
18 years ago
%{_datadir}/libsvm/examples
%{_libdir}/libsvm/
18 years ago
%files devel
%defattr(-,root,root,-)
18 years ago
%doc README
%{_includedir}/libsvm/
18 years ago
%{_datadir}/libsvm/src
%files python
%defattr(-,root,root,-)
18 years ago
%doc python/README-Python tools/README-Tools
%{libsvm_python_dir}
%files java
%defattr(-,root,root,-)
%doc java/README-Java
%{_datadir}/libsvm/java
#%{_datadir}/javadoc/%{name}-%{version}
18 years ago
%changelog
* 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)
- Move javadoc to proper place
* 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