|
|
@ -5,6 +5,7 @@
|
|
|
|
%define libsvm_python_dir %{python_sitearch}/libsvm
|
|
|
|
%define libsvm_python_dir %{python_sitearch}/libsvm
|
|
|
|
%global maven_group_id tw.edu.ntu.csie
|
|
|
|
%global maven_group_id tw.edu.ntu.csie
|
|
|
|
%global pom_file_version 3.17
|
|
|
|
%global pom_file_version 3.17
|
|
|
|
|
|
|
|
%global pom_file_name "JPP.%{maven_group_id}-%{name}.pom"
|
|
|
|
|
|
|
|
|
|
|
|
Name: libsvm
|
|
|
|
Name: libsvm
|
|
|
|
Version: 3.20
|
|
|
|
Version: 3.20
|
|
|
@ -29,7 +30,6 @@ Patch4: %{name}-%{version}.toolsDir.patch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
|
BuildRequires: grep
|
|
|
|
BuildRequires: grep
|
|
|
|
|
|
|
|
|
|
|
|
%global pom_file_name "JPP.%{maven_group_id}-%{name}.pom"
|
|
|
|
|
|
|
|
%if 0%{?rhel} != 0 && 0%{?rhel} <= 5
|
|
|
|
%if 0%{?rhel} != 0 && 0%{?rhel} <= 5
|
|
|
|
%define moc_path %{_libdir}/qt4/bin/moc
|
|
|
|
%define moc_path %{_libdir}/qt4/bin/moc
|
|
|
|
%define with_vendor "fedora"
|
|
|
|
%define with_vendor "fedora"
|
|
|
@ -37,6 +37,14 @@ BuildRequires: grep
|
|
|
|
%define moc_path %{_bindir}/moc-qt4
|
|
|
|
%define moc_path %{_bindir}/moc-qt4
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# RHEL6 does not have add_maven_depmap
|
|
|
|
|
|
|
|
%if 0%{?rhel} != 0 && 0%{?rhel} <=6
|
|
|
|
|
|
|
|
%define no_add_maven_depmap TRUE
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%define no_add_maven_depmap FALSE
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ifnarch ppc ppc64
|
|
|
|
%ifnarch ppc ppc64
|
|
|
|
%define no_java FALSE
|
|
|
|
%define no_java FALSE
|
|
|
|
%if 0%{?rhel} <= 6
|
|
|
|
%if 0%{?rhel} <= 6
|
|
|
@ -46,6 +54,7 @@ BuildRequires: grep
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
%else
|
|
|
|
%define no_java NO_JAVA
|
|
|
|
%define no_java NO_JAVA
|
|
|
|
|
|
|
|
%define no_add_maven_depmap no_add_maven_depmap
|
|
|
|
Obsoletes: libsvm-java < 2.88-1
|
|
|
|
Obsoletes: libsvm-java < 2.88-1
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
@ -135,7 +144,6 @@ cp %{SOURCE4} .
|
|
|
|
cp %{SOURCE5} %{name}-svm-toy-gtk-48.png
|
|
|
|
cp %{SOURCE5} %{name}-svm-toy-gtk-48.png
|
|
|
|
cp %{SOURCE5} %{name}-svm-toy-qt-48.png
|
|
|
|
cp %{SOURCE5} %{name}-svm-toy-qt-48.png
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if "%{no_java}" == "FALSE"
|
|
|
|
%if "%{no_java}" == "FALSE"
|
|
|
|
# Update the POM file, which is stuck on version 3.17
|
|
|
|
# Update the POM file, which is stuck on version 3.17
|
|
|
|
# pom_xpath_set does not work in rpm-4.11.1
|
|
|
|
# pom_xpath_set does not work in rpm-4.11.1
|
|
|
@ -149,7 +157,6 @@ cp %{SOURCE5} %{name}-svm-toy-qt-48.png
|
|
|
|
%{__sed} -e 's/%{pom_file_version}/%{version}/' %{SOURCE6} > %{name}.pom
|
|
|
|
%{__sed} -e 's/%{pom_file_version}/%{version}/' %{SOURCE6} > %{name}.pom
|
|
|
|
%{__sed} -i 's|<url>http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu.edu.tw/~cjlin/libsvm+tar.gz</url>|<url>https://github.com/cjlin1/libsvm</url>|' %{name}.pom
|
|
|
|
%{__sed} -i 's|<url>http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu.edu.tw/~cjlin/libsvm+tar.gz</url>|<url>https://github.com/cjlin1/libsvm</url>|' %{name}.pom
|
|
|
|
%{__sed} -i 's|<connection>http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu.edu.tw/~cjlin/libsvm+tar.gz</connection>|<connection>scm:git:https://github.com/cjlin1/libsvm.git</connection>|' %{name}.pom
|
|
|
|
%{__sed} -i 's|<connection>http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu.edu.tw/~cjlin/libsvm+tar.gz</connection>|<connection>scm:git:https://github.com/cjlin1/libsvm.git</connection>|' %{name}.pom
|
|
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
@ -204,10 +211,13 @@ mkdir -p %{buildroot}/%{_javadir}/%{maven_group_id}
|
|
|
|
mv %{buildroot}/%{_javadir}/%{name}.jar %{buildroot}/%{_javadir}/%{maven_group_id}/%{name}-%{version}.jar
|
|
|
|
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
|
|
|
|
ln -s %{name}-%{version}.jar %{buildroot}/%{_javadir}/%{maven_group_id}/%{name}.jar
|
|
|
|
ln -s %{_javadir}/%{maven_group_id}/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar
|
|
|
|
ln -s %{_javadir}/%{maven_group_id}/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar
|
|
|
|
|
|
|
|
|
|
|
|
## Install the Java POM
|
|
|
|
## Install the Java POM
|
|
|
|
mkdir -p %{buildroot}%{_mavenpomdir}
|
|
|
|
mkdir -p %{buildroot}%{_mavenpomdir}
|
|
|
|
cp -p %{name}.pom %{buildroot}%{_mavenpomdir}/%{pom_file_name}
|
|
|
|
cp -p %{name}.pom %{buildroot}%{_mavenpomdir}/%{pom_file_name}
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# RHEL6 does not support add_maven_depmap
|
|
|
|
|
|
|
|
%if "%{no_add_maven_depmap}" == "FALSE"
|
|
|
|
%add_maven_depmap %{pom_file_name} %{maven_group_id}/%{name}.jar
|
|
|
|
%add_maven_depmap %{pom_file_name} %{maven_group_id}/%{name}.jar
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
@ -281,6 +291,9 @@ rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
* Tue Jan 20 2015 Ding-Yi Chen <dchen@redhat.com> - 3.20-3
|
|
|
|
|
|
|
|
- Fix for RHEL6
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jan 20 2015 Ding-Yi Chen <dchen@redhat.com> - 3.20-2
|
|
|
|
* Tue Jan 20 2015 Ding-Yi Chen <dchen@redhat.com> - 3.20-2
|
|
|
|
- Upstream update to 3.20
|
|
|
|
- Upstream update to 3.20
|
|
|
|
|
|
|
|
|
|
|
|