Blob Blame History Raw
%global		module		OS

%if 0%{?fedora} > 21
%global		with_asl	1
%global		with_asl	0
%global		with_mpi	0

Name:		coin-or-%{module}
Group:		Applications/Engineering
Summary:	Optimization Services
Version:	2.9.3
Release:	5%{?dist}
License:	EPL
BuildRequires:	atlas-devel
BuildRequires:	blas-devel
BuildRequires:	bzip2-devel
BuildRequires:	coin-or-Bcp-devel
BuildRequires:	coin-or-Bonmin-devel
BuildRequires:	coin-or-Cbc-devel
BuildRequires:	coin-or-Clp-devel
BuildRequires:	coin-or-CoinUtils-devel
BuildRequires:	coin-or-Couenne-devel
# Until cppadd* provides coin-or-cppadd*
%if 1
BuildRequires:	cppad-devel
BuildRequires:	coin-or-cppad-devel
BuildRequires:	coin-or-DyLP-devel
%if %{with_mpi}
BuildRequires:	coin-or-Ipopt-openmpi-devel
BuildRequires:	coin-or-Ipopt-devel
BuildRequires:	coin-or-Osi-devel
BuildRequires:	coin-or-SYMPHONY-devel
BuildRequires:	coin-or-Vol-devel
BuildRequires:	doxygen
BuildRequires:	glpk-devel
BuildRequires:	graphviz
BuildRequires:	lapack-devel
%if %{with_asl}
BuildRequires:	mp-devel
%if %{with_mpi}
BuildRequires:	openmpi-devel
BuildRequires:	scalapack-openmpi-devel
BuildRequires:	openssh-clients
BuildRequires:	pkgconfig
BuildRequires:	readline-devel
BuildRequires:	zlib-devel

# Install documentation in standard rpm directory
Patch0:		%{name}-docdir.patch

# Bad #define generated if svnversion is available
Patch1:		%{name}-svnversion.patch

# Correct build when regenerating parsers
Patch2:		%{name}-flex-bison.patch

The objective of Optimization Services (OS) is to provide a set of standards
for representing optimization instances, results, solver options, and
communication between clients and solvers in a distributed environment using
Web Services. This COIN-OR project provides source code for libraries and
executable programs that implement OS standards. See the Home Site for more information.

%package	devel
Summary:	Development files for %{name}
Group:		Development/Libraries
Requires:	coin-or-CoinUtils-devel
Requires:	%{name}%{?_isa} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package	doc
Summary:	Documentation files for %{name}
Group:		Documentation
Requires:	%{name} = %{version}-%{release}
BuildArch:	noarch

%description	doc
This package contains the documentation for %{name}.

%setup -q -n %{module}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1

# --with-flex-bison is to force parses regeneration; and ensure the
# package is fully rebuildable from sources.
%configure --enable-openmp --with-flex-bison	\
%if %{with_asl}
	--with-asl-lib="-lasl -lmp -lipoptamplinterface -lbonminampl" \

# Kill rpaths
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags} all doxydoc

make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/*.la
rm %{buildroot}%{_docdir}/%{name}/LICENSE
cp -a doxydoc/html %{buildroot}%{_docdir}/%{name}

%if %{with_mpi}
LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%license LICENSE
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/AUTHORS
%doc %{_docdir}/%{name}/README
%doc %{_docdir}/%{name}/os_addlibs.txt
%if 0%{?fedora} > 21

%files		devel

%files		doc
%doc %{_docdir}/%{name}/html

* Fri Jul 03 2015 pcpa <> - 2.9.3-5
- Correct docs listed in main package (#1239155).

* Sun Jun 21 2015 pcpa <> - 2.9.3-4
- Full rebuild of coin-or stack.
- Correct file listing when asl is disabled.

* Fri Jun 19 2015 pcpa <> - 2.9.3-3
- Remove non functional attempt to prevent overlink.

* Mon Jun 15 2015 pcpa <> - 2.9.3-2
- Build documentation (#894609#c11)
- Do not overlink generated library (#894609#c11)
- Update file list when asl is disabled

* Sun Jun 14 2015 pcpa <> - 2.9.3-1
- Update to latest upstream release
- Regenerate parsers (#894609#c7)

* Mon Apr 13 2015 pcpa <> - 2.9.2-2
- Add missing bzip2, mp and zlib devel build requires
- Remove non needed doxygen build requires

* Sat Apr 11 2015 pcpa <> - 2.9.2-1
- Update to latest upstream release

* Mon Jan 14 2013 pcpa <> - 2.6.0-4
- Update to run make check (#894610#c4).

* Sat Jan 12 2013 pcpa <> - 2.6.0-3
- Rename repackaged tarball.

* Sun Nov 18 2012 pcpa <> - 2.6.0-2
- Rename package to coin-or-OS.
- Do not package Thirdy party data or data without clean license.

* Sat Sep 29 2012 pcpa <> - 2.6.0-1
- Initial coinor-OS spec.