diff --git a/libsbml.spec b/libsbml.spec index 18f62d1..672831d 100644 --- a/libsbml.spec +++ b/libsbml.spec @@ -202,6 +202,11 @@ sed -i -r 's|(#!/usr/bin/env python) +#.*|#!%{__python2}|' docs/src/filters/doc- # Delete bundled minizip rm -v src/sbml/compress/{crypt.h,ioapi.*,iowin32.*,unzip.*,zip.*} +grep -e 'This file was automatically generated by SWIG' -r . -l|xargs rm + +mkdir build-docs +cp -a $(/bin/ls -1|grep -v build-docs) build-docs/ + %build mkdir build2 build pushd build2 @@ -268,10 +273,9 @@ pushd ../build -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -Wno-dev \ .. -# Parallel compilation of java bindings fails -make +make %{?_smp_mflags} -pushd .. +pushd ../build-docs %configure --disable-static \ %if %{with doc} --with-doxygen \ @@ -281,6 +285,7 @@ pushd .. %endif --enable-layout --enable-comp --enable-fbc --enable-qual %if %{with doc} +cp ../build/src/bindings/python/libsbml-doxygen.py src/bindings/python/ make %{?_smp_mflags} docs %endif make %{?_smp_mflags} libsbml.pc @@ -308,10 +313,10 @@ rm -rf %{buildroot}%{_libdir}/R/library/%{rpkg}/R.css %endif %if %{with doc} -make install-docs DESTDIR=%{buildroot} +make -C build-docs install-docs DESTDIR=%{buildroot} mv %{buildroot}%{_pkgdocdir}-%{version} %{buildroot}%{_pkgdocdir} %endif -make install-pc DESTDIR=%{buildroot} +make -C build-docs install-pc DESTDIR=%{buildroot} %if %{with ruby} install -Dm0644 src/bindings/ruby/README.txt %{buildroot}%{_pkgdocdir}/README-ruby.txt @@ -320,9 +325,15 @@ install -Dm0644 src/bindings/ruby/README.txt %{buildroot}%{_pkgdocdir}/README-ru %if %{with check} %check %if %{with python} -make -C build2 check CTEST_OUTPUT_ON_FAILURE=TRUE -%endif -make -C build check CTEST_OUTPUT_ON_FAILURE=TRUE +pushd build2 +ctest -V %{?_smp_mflags} +popd +%endif +pushd build +# https://sourceforge.net/p/sbml/libsbml/399/ +sed -i '3i GC.disable' src/bindings/ruby/test/test.rb +ctest -V %{?_smp_mflags} +popd %endif %post -p /sbin/ldconfig