1 # TODO: coin, soplex support
4 %bcond_without static_libs # don't build static libraries
5 %bcond_with cplex # CPLEX support [IBM proprietary]
6 %bcond_without glpk # GLPK support
8 Summary: Library of Efficient Models and Optimization in Networks
9 Summary(pl.UTF-8): Biblioteka wydajnych modeli i optymalizacji w sieciach
15 Source0: http://lemon.cs.elte.hu/pub/sources/%{name}-%{version}.tar.gz
16 # Source0-md5: fd89e8bf5035b02e2622a48ac7fe0641
17 Patch0: %{name}-glpk.patch
18 URL: http://lemon.cs.elte.hu/
19 BuildRequires: autoconf >= 2.59
20 BuildRequires: automake
21 BuildRequires: doxygen
22 BuildRequires: ghostscript
23 %{?with_glpk:BuildRequires: glpk-devel >= 4.33}
24 BuildRequires: libstdc++-devel
25 BuildRequires: libtool >= 2:1.5
27 %{?with_glpk:Requires: glpk >= 4.33}
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 LEMON stands for Library for Efficient Modeling and Optimization in
32 Networks. It is a C++ template library providing efficient
33 implementations of common data structures and algorithms with focus on
34 combinatorial optimization tasks connected mainly with graphs and
37 %description -l pl.UTF-8
38 LEMON to skrót od Library for Efficient Modeling and Optimization in
39 Networks (biblioteka do wydajnego modelowania i optymalizacji w
40 sieciach). Jest to biblioteka szablonów C++ udostępniająca wydajne
41 implementacje popularnych struktur danych i algorytmów przeznaczonych
42 do zadań optymalizacji kombinatorycznej, związanych głównie z grafami
46 Summary: Header files for LEMON library
47 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LEMON
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
50 %{?with_glpk:Requires: glpk-devel >= 4.33}
51 Requires: libstdc++-devel
54 Header files for LEMON library.
56 %description devel -l pl.UTF-8
57 Pliki nagłówkowe biblioteki LEMON.
60 Summary: Static LEMON library
61 Summary(pl.UTF-8): Statyczna biblioteka LEMON
62 Group: Development/Libraries
63 Requires: %{name}-devel = %{version}-%{release}
68 %description static -l pl.UTF-8
69 Statyczna biblioteka LEMON.
72 Summary: LEMON API documentation
73 Summary(pl.UTF-8): Dokumentacja API biblioteki LEMON
77 API documentation for LEMON library.
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API biblioteki LEMON.
94 %{!?with_static_libs:--disable-static} \
95 %{!?with_cplex:--without-cplex} \
96 %{!?with_glpk:--without-glpk}
100 rm -rf $RPM_BUILD_ROOT
103 DESTDIR=$RPM_BUILD_ROOT
105 # obsoleted by pkg-config
106 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
109 rm -rf $RPM_BUILD_ROOT
111 %post -p /sbin/ldconfig
112 %postun -p /sbin/ldconfig
115 %defattr(644,root,root,755)
116 %doc AUTHORS LICENSE NEWS README
117 %attr(755,root,root) %{_bindir}/dimacs-solver
118 %attr(755,root,root) %{_bindir}/dimacs-to-lgf
119 %attr(755,root,root) %{_bindir}/lemon-0.x-to-1.x.sh
120 %attr(755,root,root) %{_bindir}/lgf-gen
121 %attr(755,root,root) %{_libdir}/libemon.so.*.*.*
122 %attr(755,root,root) %ghost %{_libdir}/libemon.so.0
125 %defattr(644,root,root,755)
126 %attr(755,root,root) %{_libdir}/libemon.so
128 %{_pkgconfigdir}/lemon.pc
130 %if %{with static_libs}
132 %defattr(644,root,root,755)
137 %defattr(644,root,root,755)