Blame coin-or-OS.spec

385b8f
%global		module		OS
385b8f
385b8f
%if 0%{?fedora} > 21
385b8f
%global		with_asl	1
385b8f
%else
385b8f
%global		with_asl	0
385b8f
%endif
385b8f
%global		with_mpi	0
385b8f
385b8f
Name:		coin-or-%{module}
385b8f
Group:		Applications/Engineering
385b8f
Summary:	Optimization Services
9d8d28
Version:	2.10.1
4cd4a8
Release:	10%{?dist}
385b8f
License:	EPL
385b8f
URL:		http://projects.coin-or.org/%{module}
385b8f
Source0:	http://www.coin-or.org/download/pkgsource/%{module}/%{module}-%{version}.tgz
385b8f
BuildRequires:	atlas-devel
452088
BuildRequires:	bison
385b8f
BuildRequires:	blas-devel
385b8f
BuildRequires:	bzip2-devel
385b8f
BuildRequires:	coin-or-Bcp-devel
385b8f
BuildRequires:	coin-or-Bonmin-devel
385b8f
BuildRequires:	coin-or-Cbc-devel
385b8f
BuildRequires:	coin-or-Clp-devel
385b8f
BuildRequires:	coin-or-CoinUtils-devel
385b8f
BuildRequires:	coin-or-Couenne-devel
385b8f
# Until cppadd* provides coin-or-cppadd*
385b8f
# https://bugzilla.redhat.com/show_bug.cgi?id=1197488
385b8f
%if 1
385b8f
BuildRequires:	cppad-devel
385b8f
%else
385b8f
BuildRequires:	coin-or-cppad-devel
385b8f
%endif
385b8f
BuildRequires:	coin-or-DyLP-devel
385b8f
%if %{with_mpi}
385b8f
BuildRequires:	coin-or-Ipopt-openmpi-devel
385b8f
%else
385b8f
BuildRequires:	coin-or-Ipopt-devel
385b8f
%endif
385b8f
BuildRequires:	coin-or-Osi-devel
385b8f
BuildRequires:	coin-or-SYMPHONY-devel
385b8f
BuildRequires:	coin-or-Vol-devel
385b8f
BuildRequires:	doxygen
452088
BuildRequires:	flex
385b8f
BuildRequires:	glpk-devel
385b8f
BuildRequires:	graphviz
385b8f
BuildRequires:	lapack-devel
385b8f
%if %{with_asl}
385b8f
BuildRequires:	mp-devel
385b8f
%endif
385b8f
%if %{with_mpi}
385b8f
BuildRequires:	openmpi-devel
385b8f
BuildRequires:	scalapack-openmpi-devel
385b8f
BuildRequires:	openssh-clients
385b8f
%endif
385b8f
BuildRequires:	pkgconfig
385b8f
BuildRequires:	readline-devel
385b8f
BuildRequires:	zlib-devel
385b8f
385b8f
# Install documentation in standard rpm directory
385b8f
Patch0:		%{name}-docdir.patch
385b8f
385b8f
# Bad #define generated if svnversion is available
385b8f
Patch1:		%{name}-svnversion.patch
385b8f
385b8f
# Correct build when regenerating parsers
385b8f
Patch2:		%{name}-flex-bison.patch
385b8f
9d8d28
# Return NULL not false from function returing a pointer
9d8d28
Patch3:		%{name}-bool-null.patch
9d8d28
385b8f
%description
385b8f
The objective of Optimization Services (OS) is to provide a set of standards
385b8f
for representing optimization instances, results, solver options, and
385b8f
communication between clients and solvers in a distributed environment using
385b8f
Web Services. This COIN-OR project provides source code for libraries and
385b8f
executable programs that implement OS standards. See the Home Site
385b8f
http://www.optimizationservices.org/ for more information.
385b8f
385b8f
%package	devel
385b8f
Summary:	Development files for %{name}
385b8f
Group:		Development/Libraries
385b8f
Requires:	coin-or-CoinUtils-devel
385b8f
Requires:	%{name}%{?_isa} = %{version}-%{release}
385b8f
385b8f
%description    devel
385b8f
The %{name}-devel package contains libraries and header files for
385b8f
developing applications that use %{name}.
385b8f
385b8f
%package	doc
385b8f
Summary:	Documentation files for %{name}
385b8f
Group:		Documentation
385b8f
Requires:	%{name} = %{version}-%{release}
385b8f
BuildArch:	noarch
385b8f
385b8f
%description	doc
385b8f
This package contains the documentation for %{name}.
385b8f
385b8f
%prep
385b8f
%setup -q -n %{module}-%{version}
385b8f
%patch0 -p1
385b8f
%patch1 -p1
385b8f
%patch2 -p1
9d8d28
%patch3 -p1
385b8f
385b8f
%build
385b8f
# --with-flex-bison is to force parses regeneration; and ensure the
385b8f
# package is fully rebuildable from sources.
385b8f
%configure --enable-openmp --with-flex-bison	\
385b8f
%if %{with_asl}
385b8f
	--with-asl-lib="-lasl -lmp -lipoptamplinterface -lbonminampl" \
385b8f
	--with-asl-incdir="%{_includedir}/asl"
385b8f
%endif
385b8f
385b8f
# Kill rpaths
385b8f
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
385b8f
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
acceae
make -j1 all doxydoc
385b8f
385b8f
%install
385b8f
make install DESTDIR=%{buildroot}
385b8f
rm -f %{buildroot}%{_libdir}/*.la
549578
rm %{buildroot}%{_docdir}/%{name}/LICENSE
385b8f
cp -a doxydoc/html %{buildroot}%{_docdir}/%{name}
385b8f
b5f405
# Test 12: Bonmin solver on bonminEx1.osil
b5f405
# fails on fedora > 25 arch armv7hl
b5f405
%if %{?fedora} > 25
385b8f
%check
385b8f
%if %{with_mpi}
385b8f
%_openmpi_load
385b8f
%endif
b5f405
%ifnarch armv7hl
385b8f
LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test
b5f405
%endif
acceae
%else
acceae
%check
acceae
%if %{with_mpi}
acceae
%_openmpi_load
acceae
%endif
acceae
LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test
b5f405
%endif
385b8f
385b8f
%post -p /sbin/ldconfig
385b8f
385b8f
%postun -p /sbin/ldconfig
385b8f
385b8f
%files
385b8f
%license LICENSE
549578
%dir %{_docdir}/%{name}
549578
%doc %{_docdir}/%{name}/AUTHORS
549578
%doc %{_docdir}/%{name}/README
549578
%doc %{_docdir}/%{name}/os_addlibs.txt
989e46
%if 0%{?fedora} > 21
385b8f
%{_bindir}/OSAmplClient
989e46
%endif
385b8f
%{_bindir}/OSSolverService
385b8f
%{_libdir}/*.so.*
385b8f
385b8f
%files		devel
385b8f
%{_includedir}/coin/*
385b8f
%{_libdir}/*.so
385b8f
%{_libdir}/pkgconfig/*
385b8f
385b8f
%files		doc
385b8f
%doc %{_docdir}/%{name}/html
385b8f
385b8f
%changelog
4cd4a8
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-10
4cd4a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
4cd4a8
29da60
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-9
29da60
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
29da60
acceae
* Thu Jun 29 2017 Antonio Trande <sagitteratfedoraproject.org> - 2.10.1-8
acceae
- Define %%check on fedora < 26
acceae
- Downgrade make job to 1
acceae
4b6f7f
* Thu Jun 29 2017 Antonio Trande <sagitteratfedoraproject.org> - 2.10.1-7
4b6f7f
- Rebuild for MUMPS-5.1.1 (after a bug-fix)
b5f405
- Exclude test on armv7hl
4b6f7f
abc17d
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.10.1-6
abc17d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
abc17d
c657d7
* Wed Apr  5 2017 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.10.1-5
c657d7
- Rebuild for newer mumps
c657d7
c4bd0c
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-4
c4bd0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c4bd0c
7c1ce3
* Sun Nov 13 2016 Peter Robinson <pbrobinson@fedoraproject.org> 2.10.1-3
7c1ce3
- Rebuild (Power64)
7c1ce3
dbb53a
* Tue Aug 02 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.10.1-2
dbb53a
- Rebuild for newer mumps
dbb53a
9d8d28
* Thu Mar 17 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.10.1-1
9d8d28
- Update to latest upstream release
9d8d28
- Correct FTBFS in rawhide (#1307390)
9d8d28
a8edea
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.3-6
a8edea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a8edea
549578
* Fri Jul 03 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.3-5
549578
- Correct docs listed in main package (#1239155).
549578
989e46
* Sun Jun 21 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.3-4
989e46
- Full rebuild of coin-or stack.
989e46
- Correct file listing when asl is disabled.
989e46
385b8f
* Fri Jun 19 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.3-3
385b8f
- Remove non functional attempt to prevent overlink.
385b8f
385b8f
* Mon Jun 15 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.3-2
385b8f
- Build documentation (#894609#c11)
385b8f
- Do not overlink generated library (#894609#c11)
385b8f
- Update file list when asl is disabled
385b8f
385b8f
* Sun Jun 14 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.3-1
385b8f
- Update to latest upstream release
385b8f
- Regenerate parsers (#894609#c7)
385b8f
385b8f
* Mon Apr 13 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.2-2
385b8f
- Add missing bzip2, mp and zlib devel build requires
385b8f
- Remove non needed doxygen build requires
385b8f
385b8f
* Sat Apr 11 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.2-1
385b8f
- Update to latest upstream release
385b8f
385b8f
* Mon Jan 14 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.6.0-4
385b8f
- Update to run make check (#894610#c4).
385b8f
385b8f
* Sat Jan 12 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.6.0-3
385b8f
- Rename repackaged tarball.
385b8f
385b8f
* Sun Nov 18 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.6.0-2
385b8f
- Rename package to coin-or-OS.
385b8f
- Do not package Thirdy party data or data without clean license.
385b8f
385b8f
* Sat Sep 29 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.6.0-1
385b8f
- Initial coinor-OS spec.