diff --git a/mp.spec b/mp.spec index fd03e6c..9504ad6 100644 --- a/mp.spec +++ b/mp.spec @@ -2,11 +2,12 @@ # mp's libraries are so installed in a private directory on epel6. # https://lists.centos.org/pipermail/centos-devel/2016-June/014820.html -%if 0%{?fedora} -%global with_jacop 0 +%if 0%{?fedora} && 0%{?fedora} > 26 +%global with_jacop 1 # https://github.com/ampl/mp/issues/109 %global with_gecode 0 -%else +%endif +%if 0%{?rhel} %global with_jacop 0 %global with_gecode 1 %endif @@ -20,7 +21,7 @@ Name: mp Version: 3.1.0 -Release: 12.%{date}git%(echo %{checkout} | cut -c-6)%{?dist} +Release: 13.%{date}git%(echo %{checkout} | cut -c-6)%{?dist} License: MIT and BSD Summary: An open-source library for mathematical programming URL: https://github.com/ampl/mp @@ -42,10 +43,10 @@ BuildRequires: cmake3 %else BuildRequires: cmake %endif -%if %{with_gecode} +%if 0%{?with_gecode} BuildRequires: gecode-devel %endif -%if %{with_jacop} +%if 0%{?with_jacop} BuildRequires: jacop BuildRequires: java-devel %endif @@ -103,7 +104,7 @@ for %{name}. %patch2 -p1 -b .jni -%if %{with_jacop} +%if 0%{?with_jacop} ln -s %{_javadir}/jacop/jacop.jar thirdparty/jacop/jacop-`rpm -q --qf "%%{VERSION}" jacop`.jar %endif @@ -115,10 +116,10 @@ export LIBS="-lgsl -L%{_libdir}/atlas -lcblas -latlas" %endif mkdir build && pushd build -%if %{with_gecode} +%if 0%{?with_gecode} BUILD="gecode" %endif -%if %{with_jacop} +%if 0%{?with_jacop} BUILD="$BUILD,jacop" %endif BUILD="$BUILD,gsl,smpswriter" @@ -181,11 +182,11 @@ install -pm 755 build/bin/ampltabl.dll %{buildroot}%{_libdir}/%{name}/bin install -pm 755 build/bin/arithchk %{buildroot}%{_libdir}/%{name}/bin install -pm 755 build/bin/cp.dll %{buildroot}%{_libdir}/%{name}/bin install -pm 755 build/bin/fullbit.dll %{buildroot}%{_libdir}/%{name}/bin -%if %{with_gecode} +%if 0%{?with_gecode} install -pm 755 build/bin/gecode %{buildroot}%{_libdir}/%{name}/bin %endif install -pm 755 build/bin/gjh %{buildroot}%{_libdir}/%{name}/bin -%if %{with_jacop} +%if 0%{?with_jacop} install -pm 755 build/bin/jacop %{buildroot}%{_libdir}/%{name}/bin %endif install -pm 755 build/bin/smpswriter %{buildroot}%{_libdir}/%{name}/bin @@ -212,7 +213,7 @@ chrpath --replace %{_libdir}/%{name} %{buildroot}%{_libdir}/%{name}/bin/cp.dll chrpath --replace %{_libdir}/%{name} %{buildroot}%{_libdir}/%{name}/bin/fullbit.dll chrpath --replace %{_libdir}/%{name} %{buildroot}%{_libdir}/%{name}/bin/gecode chrpath --replace %{_libdir}/%{name} %{buildroot}%{_libdir}/%{name}/bin/gjh -%if %{with_jacop} +%if 0%{?with_jacop} chrpath --replace %{_libdir}/%{name} %{buildroot}%{_libdir}/%{name}/bin/jacop %endif chrpath --replace %{_libdir}/%{name} %{buildroot}%{_libdir}/%{name}/bin/smpswriter @@ -235,11 +236,11 @@ chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/ampltabl.dll chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/arithchk chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/cp.dll chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/fullbit.dll -%if %{with_gecode} +%if 0%{?with_gecode} chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/gecode %endif chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/gjh -%if %{with_jacop} +%if 0%{?with_jacop} chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/jacop %endif chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/smpswriter @@ -290,6 +291,9 @@ ctest --force-new-ctest-process --parallel %{?_smp_mflags} -I 4,15,,1,17,28 %{_includedir}/mp %changelog +* Wed Nov 15 2017 Antonio Trande - 3.1.0-13.20160810git1f3980 +- Enable jacop on f27+ + * Thu Aug 03 2017 Fedora Release Engineering - 3.1.0-12.20161124git1f3980 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild