|
|
|
@ -1,15 +1,15 @@
|
|
|
|
|
%global shver 2
|
|
|
|
|
%define shver 2
|
|
|
|
|
%{!?pyver: %global pyver %(python -c 'import sys; print(sys.version[0:3])')}
|
|
|
|
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
|
|
|
%global libdir_libsvm %{_libdir}/libsvm
|
|
|
|
|
%global libsvm_python_dir %{python_sitearch}/libsvm
|
|
|
|
|
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
|
|
|
%define libdir_libsvm %{_libdir}/libsvm
|
|
|
|
|
%define libsvm_python_dir %{python_sitearch}/libsvm
|
|
|
|
|
%global maven_group_id tw.edu.ntu.csie
|
|
|
|
|
%global pom_file_version 3.17
|
|
|
|
|
%global pom_file_name JPP.%{maven_group_id}-%{name}.pom
|
|
|
|
|
|
|
|
|
|
Name: libsvm
|
|
|
|
|
Version: 3.20
|
|
|
|
|
Release: 8%{?dist}
|
|
|
|
|
Version: 3.21
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: A Library for Support Vector Machines
|
|
|
|
|
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
@ -22,39 +22,39 @@ Source3: libsvm-svm-toy-gtk.desktop
|
|
|
|
|
Source4: libsvm-svm-toy-qt.desktop
|
|
|
|
|
Source5: LibSVM-svm-toy-48.png
|
|
|
|
|
Source6: http://central.maven.org/maven2/tw/edu/ntu/csie/libsvm/%{pom_file_version}/libsvm-%{pom_file_version}.pom
|
|
|
|
|
Patch0: %{name}-%{version}.packageMain.patch
|
|
|
|
|
Patch1: %{name}-%{version}.pythonDir.patch
|
|
|
|
|
Patch2: %{name}-%{version}.javaDir.patch
|
|
|
|
|
Patch3: %{name}-%{version}.svm-toy.patch
|
|
|
|
|
Patch4: %{name}-%{version}.toolsDir.patch
|
|
|
|
|
Patch0: %{name}.packageMain.patch
|
|
|
|
|
Patch1: %{name}.pythonDir.patch
|
|
|
|
|
Patch2: %{name}.javaDir.patch
|
|
|
|
|
Patch3: %{name}.svm-toy.patch
|
|
|
|
|
Patch4: %{name}.toolsDir.patch
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
|
|
BuildRequires: grep
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} != 0 && 0%{?rhel} <= 5
|
|
|
|
|
%global moc_path %{_libdir}/qt4/bin/moc
|
|
|
|
|
%global with_vendor "fedora"
|
|
|
|
|
%define moc_path %{_libdir}/qt4/bin/moc
|
|
|
|
|
%define with_vendor "fedora"
|
|
|
|
|
%else
|
|
|
|
|
%global moc_path %{_bindir}/moc-qt4
|
|
|
|
|
%define moc_path %{_bindir}/moc-qt4
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# RHEL6 does not have enable_add_maven_depmap
|
|
|
|
|
%if 0%{?rhel} != 0 && 0%{?rhel} <= 6
|
|
|
|
|
%global enable_add_maven_depmap FALSE
|
|
|
|
|
%define enable_add_maven_depmap FALSE
|
|
|
|
|
%else
|
|
|
|
|
%global enable_add_maven_depmap TRUE
|
|
|
|
|
%define enable_add_maven_depmap TRUE
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ifnarch ppc ppc64
|
|
|
|
|
%global no_java FALSE
|
|
|
|
|
%define no_java FALSE
|
|
|
|
|
%if 0%{?rhel} <= 6
|
|
|
|
|
%global java_dependency java
|
|
|
|
|
%else
|
|
|
|
|
%global java_dependency java-headless
|
|
|
|
|
%define java_dependency java
|
|
|
|
|
%else
|
|
|
|
|
%define java_dependency java-headless
|
|
|
|
|
%endif
|
|
|
|
|
%else
|
|
|
|
|
%global no_java NO_JAVA
|
|
|
|
|
%global enable_add_maven_depmap FALSE
|
|
|
|
|
%define no_java NO_JAVA
|
|
|
|
|
%define enable_add_maven_depmap FALSE
|
|
|
|
|
Obsoletes: libsvm-java < 2.88-1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
@ -200,16 +200,18 @@ desktop-file-install --delete-original \
|
|
|
|
|
%{buildroot}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Python
|
|
|
|
|
# Fix Bug 646154 - libsvm-python's pth is not set correctly
|
|
|
|
|
echo 'libsvm' > %{buildroot}/%{python_sitearch}/libsvm.pth
|
|
|
|
|
|
|
|
|
|
for p in %{buildroot}%{libsvm_python_dir}/*.py;do
|
|
|
|
|
sed -i -e 's|#!/usr/bin/env python|#!%{__python2}|' $p
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Java
|
|
|
|
|
%if "%{no_java}" == "FALSE"
|
|
|
|
|
## Move jars to correct directory
|
|
|
|
|
mkdir -p %{buildroot}/%{_javadir}/%{maven_group_id}
|
|
|
|
|
mv %{buildroot}/%{_javadir}/%{name}.jar %{buildroot}/%{_javadir}/%{maven_group_id}/%{name}-%{version}.jar
|
|
|
|
|
ln -s %{name}-%{version}.jar %{buildroot}/%{_javadir}/%{maven_group_id}/%{name}.jar
|
|
|
|
|
mv %{buildroot}/%{_javadir}/%{name}.jar %{buildroot}/%{_javadir}/%{maven_group_id}/%{name}.jar
|
|
|
|
|
ln -s %{_javadir}/%{maven_group_id}/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar
|
|
|
|
|
## Install the Java POM
|
|
|
|
|
mkdir -p %{buildroot}%{_mavenpomdir}
|
|
|
|
@ -247,6 +249,7 @@ rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc COPYRIGHT FAQ.html ChangeLog guide.pdf
|
|
|
|
|
%{_bindir}/svm-predict
|
|
|
|
|
%{_bindir}/svm-scale
|
|
|
|
@ -256,11 +259,13 @@ rm -rf %{buildroot}
|
|
|
|
|
%{_libdir}/%{name}.so.%{shver}
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc README
|
|
|
|
|
%{_includedir}/%{name}/
|
|
|
|
|
%{_libdir}/%{name}.so
|
|
|
|
|
|
|
|
|
|
%files python
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc python/README-Python tools/README-Tools
|
|
|
|
|
%{libsvm_python_dir}
|
|
|
|
|
%{_bindir}/svm-*.py
|
|
|
|
@ -272,9 +277,9 @@ rm -rf %{buildroot}
|
|
|
|
|
%else
|
|
|
|
|
%files java
|
|
|
|
|
%endif
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc java/README-Java java/test_applet.html
|
|
|
|
|
%{_javadir}/%{name}.jar
|
|
|
|
|
%{_javadir}/%{maven_group_id}/%{name}-%{version}.jar
|
|
|
|
|
%if "%{enable_add_maven_depmap}" == "FALSE"
|
|
|
|
|
%{_javadir}/%{maven_group_id}/%{name}.jar
|
|
|
|
|
%{_mavenpomdir}/%{pom_file_name}
|
|
|
|
@ -282,29 +287,23 @@ rm -rf %{buildroot}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%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/*%{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/*%{name}-svm-toy-qt.desktop
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20-8
|
|
|
|
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
|
|
|
|
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.20-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Dec 25 2015 Björn Esser <fedora@besser82.io> - 3.20-6
|
|
|
|
|
- Replaced %%define with %%global
|
|
|
|
|
- dropped %%defattr
|
|
|
|
|
- clean trailing whitespaces
|
|
|
|
|
* Wed Jul 20 2016 Ding-Yi Chen <dchen@redhat.com> - 3.21-1
|
|
|
|
|
- Upstream update to 3.21
|
|
|
|
|
- Fixes Bug 1277450 - libsvm(-java) remove versioned jars from {_javadir}
|
|
|
|
|
|
|
|
|
|
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
@ -339,7 +338,7 @@ rm -rf %{buildroot}
|
|
|
|
|
* Tue Apr 22 2014 Ding-Yi Chen <dchen@redhat.com> - 3.18-1
|
|
|
|
|
- Upstream update to 3.18
|
|
|
|
|
- svm.cpp and svm-scale.c: check return values of fscanf
|
|
|
|
|
- matlab interface: Makefile no longer handles octave
|
|
|
|
|
- matlab interface: Makefile no longer handles octave
|
|
|
|
|
because make.m should be used
|
|
|
|
|
|
|
|
|
|
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 3.17-4
|
|
|
|
|