1639ab7
%global		module		Bonmin
2a7027f
%global		with_asl	1
2a7027f
%global		with_mpi	0
2a7027f
1639ab7
Name:		coin-or-%{module}
1639ab7
Summary:	Basic Open-source Nonlinear Mixed INteger programming
31ad9b2
Version:	1.8.8
57f8ce9
Release:	2%{?dist}
91db1d6
License:	EPL-1.0
1639ab7
URL:		http://projects.coin-or.org/%{module}
1639ab7
Source0:	http://www.coin-or.org/download/pkgsource/%{module}/%{module}-%{version}.tgz
91db1d6
BuildRequires:	coin-or-Cgl-doc
91db1d6
BuildRequires:	coin-or-Clp-doc
91db1d6
BuildRequires:	coin-or-Ipopt-common
2a7027f
%if %{with_mpi}
2a7027f
BuildRequires:	coin-or-Ipopt-openmpi-devel
2a7027f
%else
31ad9b2
BuildRequires:	pkgconfig(ipopt)
2a7027f
%endif
31ad9b2
BuildRequires:	doxygen-latex
91db1d6
BuildRequires:	gcc-c++
31ad9b2
BuildRequires:	help2man
2a7027f
%if %{with_asl}
2a7027f
BuildRequires:	mp-devel
2a7027f
%endif
2a7027f
%if %{with_mpi}
31ad9b2
BuildRequires:	pkgconfig(ompi)
1639ab7
BuildRequires:	scalapack-openmpi-devel
1639ab7
BuildRequires:	openssh-clients
2a7027f
%endif
31ad9b2
BuildRequires:	pkgconfig(cbc)
91db1d6
BuildRequires:	tex(tex4ht.sty)
91db1d6
BuildRequires:	tex(threeparttable.sty)
1639ab7
1639ab7
# Install documentation in standard rpm directory
1639ab7
Patch0:		%{name}-docdir.patch
1639ab7
91db1d6
# Fix a typo in the violation code
31ad9b2
Patch1:		%{name}-typo.patch
91db1d6
91db1d6
# Fix mixed signed/unsigned operations
31ad9b2
Patch2:		%{name}-sign.patch
91db1d6
1639ab7
%description
1639ab7
Bonmin (Basic Open-source Nonlinear Mixed INteger programming) is an
1639ab7
experimental open-source C++ code for solving general MINLP (Mixed Integer
1639ab7
NonLinear Programming) problems of the form:
1639ab7
1639ab7
   min     f(x)
1639ab7
1639ab7
s.t.	   g_L <= g(x) <= g_U
1639ab7
	   x_L <=  x   <= x_U
1639ab7
	   x_i in Z for all i in I and,
1639ab7
	   x_i in R for all i not in I.
1639ab7
1639ab7
where f(x): R^n --> R, g(x): R^n --> R^m are twice continuously differentiable
1639ab7
functions and I is a subset of {1,..,n}.
1639ab7
1639ab7
Bonmin features several algorithms
1639ab7
1639ab7
  * B-BB is a NLP-based branch-and-bound algorithm,
1639ab7
  * B-OA is an outer-approximation decomposition algorithm,
1639ab7
  * B-QG is an implementation of Quesada and Grossmann's branch-and-cut
1639ab7
    algorithm,
1639ab7
  * B-Hyb is a hybrid outer-approximation based branch-and-cut algorithm. 
1639ab7
1639ab7
The algorithms in Bonmin are exact when the functions f and g are convex;
1639ab7
in the case where f or g or both are non-convex they are heuristics.
1639ab7
1639ab7
%package	devel
1639ab7
Summary:	Development files for %{name}
91db1d6
Requires:	coin-or-Cbc-devel%{?_isa}
91db1d6
Requires:	coin-or-Cgl-devel%{?_isa}
91db1d6
%if %{with_mpi}
91db1d6
Requires:	coin-or-Ipopt-openmpi-devel%{?_isa}
91db1d6
%else
91db1d6
Requires:	coin-or-Ipopt-devel%{?_isa}
91db1d6
%endif
1639ab7
Requires:	%{name}%{?_isa} = %{version}-%{release}
1639ab7
1639ab7
%description    devel
1639ab7
The %{name}-devel package contains libraries and header files for
1639ab7
developing applications that use %{name}.
1639ab7
1639ab7
%package	doc
1639ab7
Summary:	Documentation files for %{name}
91db1d6
Requires:	coin-or-Cgl-doc
91db1d6
Requires:	coin-or-Clp-doc
91db1d6
Requires:	coin-or-Ipopt-common
1639ab7
Requires:	%{name} = %{version}-%{release}
1639ab7
1639ab7
%description	doc
1639ab7
This package contains the documentation for %{name}.
1639ab7
1639ab7
%prep
332ba6d
%autosetup -p1 -n %{module}-%{version}
1639ab7
31ad9b2
# The pkgconfig file lists transitive dependencies.  Those are necessary when
31ad9b2
# using static libraries, but not with shared libraries.
31ad9b2
sed -i 's/ @BONMINLIB_PCLIBS@/\nLibs.private:&/' bonmin.pc.in
31ad9b2
1639ab7
%build
2a7027f
%if %{with_mpi}
1639ab7
%_openmpi_load
2a7027f
%endif
2a7027f
%configure	\
2a7027f
%if %{with_asl}
91db1d6
	--with-asl-lib="-lasl -lipoptamplinterface" \
2a7027f
	--with-asl-incdir="%{_includedir}/asl"
2a7027f
%endif
1639ab7
91db1d6
# Get rid of undesirable hardcoded rpaths; workaround libtool reordering
91db1d6
# -Wl,--as-needed after all the libraries.
91db1d6
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
91db1d6
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
91db1d6
    -e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \
91db1d6
    -i libtool
1639ab7
91db1d6
%make_build all doxydoc
c772349
make -C doc all
1639ab7
1639ab7
%install
332ba6d
%make_install
1639ab7
rm -f %{buildroot}%{_libdir}/*.la
91db1d6
rm %{buildroot}%{_docdir}/%{name}/LICENSE
91db1d6
cp -a AUTHORS README doxydoc/{html,*.tag} %{buildroot}%{_pkgdocdir}
31ad9b2
mkdir -p %{buildroot}%{_mandir}/man1
31ad9b2
LD_LIBRARY_PATH=%{buildroot}%{_libdir} help2man -N src/Apps/.libs/bonmin > \
31ad9b2
  %{buildroot}%{_mandir}/man1/bonmin.1
1639ab7
1639ab7
%check
2a7027f
%if %{with_mpi}
1639ab7
%_openmpi_load
2a7027f
%endif
1639ab7
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH make test
1639ab7
0eeb8c9
%ldconfig_scriptlets
1639ab7
1639ab7
%files
5c1ae1c
%license LICENSE
91db1d6
%dir %{_pkgdocdir}
91db1d6
%{_pkgdocdir}/AUTHORS
91db1d6
%{_pkgdocdir}/README
2a7027f
%{_bindir}/bonmin
91db1d6
%{_libdir}/libbonmin.so.4
91db1d6
%{_libdir}/libbonmin.so.4.*
91db1d6
%if %{with_asl}
91db1d6
%{_libdir}/libbonminampl.so.4
91db1d6
%{_libdir}/libbonminampl.so.4.*
91db1d6
%endif
31ad9b2
%{_mandir}/man1/bonmin.1*
1639ab7
8c29798
%files devel
1639ab7
%{_includedir}/coin/*
91db1d6
%{_libdir}/libbonmin.so
91db1d6
%{_libdir}/pkgconfig/bonmin.pc
91db1d6
%if %{with_asl}
91db1d6
%{_libdir}/libbonminampl.so
91db1d6
%{_libdir}/pkgconfig/bonminamplinterface.pc
91db1d6
%endif
1639ab7
8c29798
%files doc
8c29798
%doc doc/html
91db1d6
%{_pkgdocdir}/html/
91db1d6
%{_pkgdocdir}/bonmin_doxy.tag
1639ab7
1639ab7
%changelog
57f8ce9
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.8-2
57f8ce9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
57f8ce9
31ad9b2
* Fri Feb 21 2020 Jerry James <loganjerry@gmail.com> - 1.8.8-1
31ad9b2
- Release 1.8.8
31ad9b2
- BR help2man and generate a man page for the binary
82c2b47
- Make the -doc subpackage be arch-specific to work around FTBFS
31ad9b2
6045462
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.7-4
6045462
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
6045462
d54f1d5
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.7-3
d54f1d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
d54f1d5
91db1d6
* Thu Jun 27 2019 Jerry James <loganjerry@gmail.com> - 1.8.7-2
91db1d6
- Correct license from CPL to EPL-1.0
91db1d6
- Eliminate unnecessary BRs and Rs
91db1d6
- Force libtool to not defeat -Wl,--as-needed
91db1d6
- Be explicit about library versions as required by latest guidelines
91db1d6
- Add doxygen documentation to the -doc subpackage
91db1d6
- Package doxygen tag file to enable cross-linking
91db1d6
8c29798
* Tue Apr 09 2019 Antonio Trande <sagitter@fedoraproject.org> - 1.8.7-1
8c29798
- Release 1.8.7
8c29798
- Avoid mixed use of %%doc and %%docdir
8c29798
0d68867
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.6-2
0d68867
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
0d68867
332ba6d
* Thu Nov 01 2018 Antonio Trande <sagitter@fedoraproject.org> - 1.8.6-1
332ba6d
- Release 1.8.6
332ba6d
39177a1
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.4-16
39177a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
39177a1
95c4277
* Sun Jun 03 2018 Antonio Trande <sagitter@fedoraproject.org> - 1.8.4-15
95c4277
- Rebuild for Ipopt-3.12.10
95c4277
19d9c93
* Fri Feb 23 2018 Antonio Trande <sagitter@fedoraproject.org> - 1.8.4-14
19d9c93
- Rebuild for Ipopt-3.12.9
19d9c93
- Rebuild against openblas
19d9c93
530bb37
* Wed Feb 21 2018 Antonio Trande <sagitter@fedoraproject.org> - 1.8.4-13
530bb37
- Add gcc gcc-c++ BR
530bb37
0eeb8c9
* Thu Feb 15 2018 Antonio Trande <sagitter@fedoraproject.org> - 1.8.4-12
0eeb8c9
- Use %%ldconfig_scriptlets
0eeb8c9
7bdc518
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.4-11
7bdc518
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
7bdc518
d7191e4
* Sun Oct 29 2017 Antonio Trande <sagitterATfedoraproject.org> - 1.8.4-10
d7191e4
- Rebuild for MUMPS-5.1.2
d7191e4
22d0b6e
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.4-9
22d0b6e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
22d0b6e
6c489de
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.4-8
6c489de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
6c489de
a13cb0b
* Thu Jun 29 2017 Antonio Trande <sagitterATfedoraproject.org> - 1.8.4-7
a13cb0b
- Rebuild for MUMPS-5.1.1 (after a bug-fix)
a13cb0b
6a94d4a
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.4-6
6a94d4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
6a94d4a
34407e7
* Wed Apr  5 2017 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.8.4-5
34407e7
- Rebuild for newer mumps
34407e7
de4ef62
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.4-4
de4ef62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
de4ef62
361e641
* Sun Nov 13 2016 Peter Robinson <pbrobinson@fedoraproject.org> 1.8.4-3
361e641
- rebuild (Power64)
361e641
5c1ae1c
* Tue Aug 02 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.8.4-2
5c1ae1c
- Rebuild for newer mumps
5c1ae1c
bf46cab
* Wed Mar 16 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.8.4-1
bf46cab
- Update to latest upstream release
bf46cab
b128ab2
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-8
b128ab2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b128ab2
8bba571
* Fri Jul 03 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.8.1-7
8bba571
- Correct docs listed in main package (#1239155).
8bba571
3a46958
* Sat Jun 20 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.8.1-6
3a46958
- Full rebuild of coin-or stack.
3a46958
5fab713
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.1-5
5fab713
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5fab713
f64db9b
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.8.1-4
f64db9b
- Rebuilt for GCC 5 C++11 ABI change
f64db9b
2a7027f
* Sun Feb 22 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.8.1-1
2a7027f
- Update to latest upstream release.
2a7027f
- Add asl solver and openmpi build conditionals.
2a7027f
aad2feb
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.4-3
aad2feb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
aad2feb
1639ab7
* Mon Jul 14 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.7.4-2
1639ab7
- Add texlive as explicit build requires.
1639ab7
1639ab7
* Sat Apr 19 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.7.4-1
1639ab7
- Update to latest upstream release.
1639ab7
1639ab7
* Mon Jan 14 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6.0-4
1639ab7
- Update to run make check (#894610#c4).
1639ab7
1639ab7
* Sat Jan 12 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6.0-3
1639ab7
- Rename repackaged tarball.
1639ab7
1639ab7
* Sun Nov 18 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6.0-2
1639ab7
- Rename package to coin-or-Bonmin.
1639ab7
- Do not package Thirdy party data or data without clean license.
1639ab7
1639ab7
* Sat Sep 29 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6.0-1
1639ab7
- Initial coinor-Bonmin spec.