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