diff --git a/libsvm.spec b/libsvm.spec index 20c069c..6aaad7e 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,6 +1,7 @@ %define shver 2 %{!?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 libdir_libsvm %{_libdir}/libsvm %define libsvm_python_dir %{python_sitearch}/libsvm Name: libsvm @@ -25,8 +26,6 @@ Patch4: %{name}-%{version}.toolsDir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: grep -%define libdir_libsvm %{_libdir}/libsvm - %if 0%{?rhel} <= 5 %define moc_path %{_libdir}/qt4/bin/moc %define with_vendor "fedora" @@ -75,7 +74,7 @@ Python tools and interfaces for libsvm. Install this package if you want to develop programs with libsvm in Python. -%if "%{NO_JAVA}" == "FALSE" +%if "%{no_java}" == "FALSE" %package java Summary: Java tools and interfaces for libsvm Group: Development/Libraries @@ -161,12 +160,12 @@ echo -e "# This file is not in the original libsvm tarball, but added for conven # This file is released under BSD license, just like the rest of the package.\n"\ > $RPM_BUILD_ROOT/%{libsvm_python_dir}/__init__.py -%if 0%{?with_vendor} +%if 0%{?with_vendor:1} desktop-file-install --delete-original --vendor=%{with_vendor} \ --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 -%eles +%else desktop-file-install --delete-original \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \ @@ -208,7 +207,6 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/%{name}/examples %{_libdir}/%{name}.so.%{shver} - %files devel %defattr(-,root,root,-) %doc README @@ -222,7 +220,7 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/svm-*.py %{python_sitearch}/libsvm.pth -%ifnarch ppc ppc64 +%if "%{no_java}" == "FALSE" %files java %defattr(-,root,root,-) %doc java/README-Java java/test_applet.html diff --git a/log b/log index 12cce0f..4c7d592 100644 --- a/log +++ b/log @@ -258,4 +258,4 @@ i subroutines to get SVs initialize model->sv_indices as null in svm_load_model if nr_fold > # data, change nr_fold to be # data and ro leave-one-out cv matlab interface: - handle the problem where output variables are not specified + handle the problem where output variables are not specified \ No newline at end of file