Blob Blame History Raw
%global		module		Dip

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

Name:		coin-or-%{module}
Group:		Applications/Engineering
Summary:	Decomposition for Integer Programming
Version:	0.92.2
Release:	6%{?dist}
License:	EPL
URL:		http://www.coin-or.org/projects/%{module}.xml
Source0:	http://www.coin-or.org/download/pkgsource/%{module}/%{module}-%{version}.tgz
BuildRequires:	atlas-devel
BuildRequires:	blas-devel
BuildRequires:	bzip2-devel
BuildRequires:	coin-or-Alps-devel
BuildRequires:	coin-or-Cbc-devel
BuildRequires:	coin-or-Cgl-devel
BuildRequires:	coin-or-Clp-devel
BuildRequires:	coin-or-CoinUtils-devel
%if %{with_mpi}
BuildRequires:	coin-or-Ipopt-openmpi-devel
%else
BuildRequires:	coin-or-Ipopt-devel
%endif
BuildRequires:	coin-or-Osi-devel
BuildRequires:	coin-or-SYMPHONY-devel
BuildRequires:	glpk-devel
BuildRequires:	lapack-devel
%if %{with_asl}
BuildRequires:	mp-devel
%endif
%if %{with_mpi}
BuildRequires:	openmpi-devel
BuildRequires:	scalapack-openmpi-devel
BuildRequires:	openssh-clients
%endif
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

%description
DIP (Decomposition for Integer Programming) is an open-source extensible
software framework for implementing decomposition-based bounding algorithms
for use in solving large-scale discrete optimization problems. The framework
provides a simple API for experimenting with various decomposition-based
algorithms, such as Dantzig-Wolfe decomposition, Lagrangian relaxation,
and various cutting plane methods. Given a compact formulation and a
relaxation, the framework takes care of all algorithmic details associated
with implementing any of a wide range of decomposition-based algorithms,
such as branch and cut, branch and price, branch and cut and price,
subgradient-based Lagrangian relaxation, branch and relax and cut, and
decompose and cut. The user can specify customizations, such as methods
for generating valid inequalities and branching, in terms of the variables
of the compact formulation, without having to worry about the details of
any required reformulations.

%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
%if %{with_mpi}
%_openmpi_load
%endif
%configure --enable-openmp	\
%if %{with_asl}
	--with-asl-lib="-lasl -lmp -lipoptamplinterface -lbonminampl" \
	--with-asl-incdir="%{_includedir}/asl"
%endif

# 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

%install
make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/*.la
install -m 644 AUTHORS README* %{buildroot}%{_pkgdocdir}

%check
%if %{with_mpi}
%_openmpi_load
%endif
LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%license LICENSE
%{_pkgdocdir}
%{_bindir}/dip
%{_libdir}/*.so.*

%files		devel
%{_includedir}/coin/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*

%changelog
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.92.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.92.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.92.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.92.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.92.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Aug 02 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.92.2-1
- Update to latest upstream release

* Sun Mar 13 2016 Ralf Cors├ępius <corsepiu@fedoraproject.org> - 0.91.2-6
- Install docs directly into %%{_pkgdocdir} (F24FTBFS, RHBZ#1307388).

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.91.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sat Jun 20 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.91.2-4
- Full rebuild of coin-or stack.

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.91.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.91.2-2
- Rebuilt for GCC 5 C++11 ABI change

* Mon Mar 23 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.91.2-1
- Update to latest upstream release.
- Rediff patches (#894602#c10)
- Use license macro (#894602#c10)

* Sat Feb 28 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.91.1-1
- Update to latest upstream release.

* Mon Apr 21 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.9.9-2
- Disable python subpackage, it should be packaged separately (#894602#c4).

* Sat Apr 19 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.9.9-1
- Update to latest upstream release.
- Create new python subpackage.

* Fri Nov  1 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.9.4-1
- Update to latest upstream release.

* Mon Jan 14 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.83.2-4
- Update to run make check (#894610#c4).

* Sat Jan 12 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.83.2-3
- Rename repackaged tarball.

* Sun Nov 18 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.83.2-2
- Rename package to coin-or-Dip.
- Do not package Thirdy party data or data without clean license.

* Sat Sep 29 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.83.2-1
- Initial coinor-Dip spec.