Name: coin-or-lemon Version: 1.3 Release: 3%{?dist} Summary: A C++ template library providing many common graph algorithms License: Boost and BSD URL: http://lemon.cs.elte.hu/trac/lemon Source0: http://lemon.cs.elte.hu/pub/sources/lemon-%{version}.tar.gz # Fix for upstream bug #476, needed for tests to pass. Patch0: lemon-1.3-tsp_test-1ba759c76810.patch BuildRequires: cmake # We need to force a soname, because upstream doesn't provide one. See: # http://lemon.cs.elte.hu/trac/lemon/ticket/482 %global libemon_soversion 0.1 %description LEMON stands for Library for Efficient Modeling and Optimization in Networks. It is a C++ template library providing efficient implementations of common data structures and algorithms with focus on combinatorial optimization tasks connected mainly with graphs and networks. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package tools Summary: Command-line tools for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description tools The %{name}-tools package contains a handful of command-line tools that come with %{name}. %package doc Summary: Documentation for for %{name} BuildArch: noarch %description doc The %{name}-doc package contains a %{name}'s API documentation. %prep %setup -q -n lemon-%{version} %patch0 -p1 # Force a soname sover_prefix="SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon" grep -q "${sover_prefix})" lemon/CMakeLists.txt sed -i -e "s/${sover_prefix})/${sover_prefix} VERSION %{libemon_soversion} SOVERSION %{libemon_soversion})/" lemon/CMakeLists.txt %build # We can't easily build using GLPK (#481), CPLEX (aka ILOG) is non-free, # and the COIN requisites aren't packaged, so turn them all off. # # We suppress detection of ghostscript, doxygen, and python to make # the build behave the same way with and without them installed -- we # don't actually need them, since we don't need to rebuild the docs. %cmake -DLEMON_ENABLE_GLPK=NO -DLEMON_ENABLE_ILOG=NO -DLEMON_ENABLE_COIN=NO \ -DGHOSTSCRIPT_EXECUTABLE= -DDOXYGEN_EXECUTABLE= -DPYTHON_EXECUTABLE= make %{?_smp_mflags} %check make check %install %make_install # lemon hardcodes prefix/lib for libraries. Fix it. if [[ "%{_libdir}" != "/usr/lib" ]]; then mv %{buildroot}/usr/lib %{buildroot}/%{_libdir} fi # Annoyingly, 'make install' will only install docs if it rebuilt them. # Rather than patching CMakeLists.txt, just install them manually. mkdir -p %{buildroot}/%{_pkgdocdir}/ cp -r -p doc/html %{buildroot}/%{_pkgdocdir}/ # We also need to install NEWS, README, and LICENSE. See: # https://fedorahosted.org/fpc/ticket/338 cp -r -p NEWS LICENSE README %{buildroot}/%{_pkgdocdir}/ # We don't own /usr/share/lemon; rename it mv %{buildroot}/%{_datadir}/lemon %{buildroot}/%{_datadir}/%{name} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %dir %{_pkgdocdir} %{_pkgdocdir}/NEWS %{_pkgdocdir}/README %{_pkgdocdir}/LICENSE %{_libdir}/*.so.* %files devel %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %{_datadir}/coin-or-lemon/ %files tools %{_bindir}/* %files doc %{_pkgdocdir} %exclude %{_pkgdocdir}/NEWS %exclude %{_pkgdocdir}/README %changelog * Thu Jun 05 2014 Andy Lutomirski - 1.3-3 - Use _pkgdocdir consistently (f19 fix) * Wed Jun 04 2014 Andy Lutomirski - 1.3-2 - Add a downstream soname for libemon.so. - Fix conflicts with the package called 'lemon'. - Fix directory ownership. - Fix license. - Fix doc timestamps. * Wed Feb 5 2014 Andy Lutomirski - 1.3-1 - Initial version.