%global module CoinMP
Name: coin-or-%{module}
Group: Applications/Engineering
Summary: C-API interface to CLP, CBC and CGL
Version: 1.7.6
Release: 3%{?dist}
License: CPL
URL: http://projects.coin-or.org/%{module}
Source0: http://www.coin-or.org/download/pkgsource/%{module}/%{module}-%{version}.tgz
BuildRequires: atlas-devel
BuildRequires: blas-devel
BuildRequires: bzip2-devel
BuildRequires: coin-or-Cbc-devel
BuildRequires: coin-or-Cgl-devel
BuildRequires: coin-or-Clp-devel
BuildRequires: coin-or-CoinUtils-devel
BuildRequires: coin-or-Osi-devel
BuildRequires: glpk-devel
BuildRequires: lapack-devel
BuildRequires: pkgconfig
BuildRequires: readline-devel
BuildRequires: zlib-devel
# Properly handle DESTDIR
Patch0: %{name}-pkgconfig.patch
# Install documentation in standard rpm directory
Patch1: %{name}-docdir.patch
%description
CoinMP is a C-API library that supports most of the functionality of CLP
(Coin LP), CBC (Coin Branch-and-Cut), and CGL (Cut Generation Library)
projects.
%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}.
%prep
%setup -q -n %{module}-%{version}
%patch0 -p1
%patch1 -p1
%build
%configure
make %{?_smp_mflags} all
%install
make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/*.la
# Some install rule install 2 sample doc files under buildroot/buildroot
for file in `find %{buildroot}%{buildroot} -type f`; do
mv $file `echo $file | sed -e 's|%{buildroot}||'`
done
# Use unix style line endings
for file in README AUTHORS example.c LICENSE; do
sed -i 's|\r||' %{buildroot}%{_docdir}/%{name}/$file
done
%check
make test
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc %{_docdir}/%{name}
%{_libdir}/*.so.*
%files devel
%{_includedir}/coin/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%changelog
* Sat Feb 21 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.7.6-3
- Rebuild to ensure using latest C++ abi changes.
* Tue Nov 11 2014 Caolán McNamara <caolanm@redht.com> - 1.7.6-2
- Rebuild because coin-or-Clp is newer than this and the size of class
ClpSimplex changed since the last version => libreoffice's coinmp using
solver crashes
* Sat Apr 19 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.7.6-1
- Update to latest upstream release.
* Fri Nov 1 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.7.1-1
- Update to latest upstream release.
* Mon Jan 14 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6.0-4
- Update to run make check (#894610#c4).
* Sat Jan 12 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6.0-3
- Rename repackaged tarball.
* Sun Nov 18 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6.0-2
- Rename package to coin-or-CoinMP.
- Do not package Thirdy party data or data without clean license.
* Sat Sep 29 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6.0-1
- Initial coinor-CoinMP spec.