Name: coin-or-lemon Version: 1.3 Release: 1%{?dist} Summary: A C++ template library providing many common graph algorithms License: Boost URL: http://lemon.cs.elte.hu/trac/lemon Source0: http://lemon.cs.elte.hu/pub/sources/lemon-%{version}.tar.gz Patch0: lemon-1.3-tsp_test-1ba759c76810.patch BuildRequires: cmake %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 %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 pytyhon 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}/%{_docdir}/lemon/ cp -r doc/html %{buildroot}/%{_docdir}/lemon/ %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc NEWS %doc README %doc LICENSE # libemon.so is unversioned %{_libdir}/*.so %files devel %{_includedir}/* %{_libdir}/pkgconfig/*.pc %{_datadir}/lemon/cmake/LEMONConfig.cmake %files tools %{_bindir}/* %files doc %doc LICENSE %doc %{_docdir}/lemon/html/* %changelog * Wed Feb 5 2014 Andy Lutomirski - 1.3-1 - Initial version.