]>
Commit | Line | Data |
---|---|---|
8367cb3b | 1 | # TODO: coin support |
b2972915 JB |
2 | # |
3 | # Conditional build: | |
edc4f50e JB |
4 | %bcond_with coin # COIN solver backend |
5 | %bcond_with cplex # ILOG (CPLEX) solver backend [IBM proprietary] | |
6 | %bcond_without glpk # GLPK solver backend | |
7 | %bcond_with soplex # SoPlex solver backend | |
b2972915 JB |
8 | # |
9 | Summary: Library of Efficient Models and Optimization in Networks | |
10 | Summary(pl.UTF-8): Biblioteka wydajnych modeli i optymalizacji w sieciach | |
11 | Name: lemon | |
d4a4dbb6 | 12 | Version: 1.3.1 |
b2972915 JB |
13 | Release: 1 |
14 | License: Boost v1.0 | |
15 | Group: Libraries | |
16 | Source0: http://lemon.cs.elte.hu/pub/sources/%{name}-%{version}.tar.gz | |
d4a4dbb6 | 17 | # Source0-md5: e89f887559113b68657eca67cf3329b5 |
ec613515 | 18 | Patch0: %{name}-libdir.patch |
b2972915 | 19 | URL: http://lemon.cs.elte.hu/ |
edc4f50e JB |
20 | %if %{with coin} |
21 | BuildRequires: CoinCbc-devel | |
22 | BuildRequires: CoinCbcSolver-devel | |
23 | BuildRequires: CoinCgl-devel | |
24 | BuildRequires: CoinClp-devel | |
25 | BuildRequires: CoinOsi-devel | |
26 | BuildRequires: CoinOsiCbc-devel | |
27 | BuildRequires: CoinOsiClp-devel | |
28 | BuildRequires: CoinUtils-devel | |
29 | %endif | |
d4a4dbb6 | 30 | BuildRequires: cmake >= 2.8 |
b2972915 JB |
31 | BuildRequires: doxygen |
32 | BuildRequires: ghostscript | |
33 | %{?with_glpk:BuildRequires: glpk-devel >= 4.33} | |
34 | BuildRequires: libstdc++-devel | |
b2972915 | 35 | BuildRequires: python |
8367cb3b | 36 | %{?with_soplex:BuildRequires: soplex-devel} |
b2972915 JB |
37 | %{?with_glpk:Requires: glpk >= 4.33} |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %description | |
41 | LEMON stands for Library for Efficient Modeling and Optimization in | |
42 | Networks. It is a C++ template library providing efficient | |
43 | implementations of common data structures and algorithms with focus on | |
44 | combinatorial optimization tasks connected mainly with graphs and | |
45 | networks. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | LEMON to skrót od Library for Efficient Modeling and Optimization in | |
49 | Networks (biblioteka do wydajnego modelowania i optymalizacji w | |
50 | sieciach). Jest to biblioteka szablonów C++ udostępniająca wydajne | |
51 | implementacje popularnych struktur danych i algorytmów przeznaczonych | |
52 | do zadań optymalizacji kombinatorycznej, związanych głównie z grafami | |
53 | i sieciami. | |
54 | ||
55 | %package devel | |
56 | Summary: Header files for LEMON library | |
57 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LEMON | |
58 | Group: Development/Libraries | |
59 | Requires: %{name} = %{version}-%{release} | |
b2972915 | 60 | Requires: libstdc++-devel |
d4a4dbb6 | 61 | Obsoletes: lemon-static |
b2972915 JB |
62 | |
63 | %description devel | |
64 | Header files for LEMON library. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Pliki nagłówkowe biblioteki LEMON. | |
68 | ||
b2972915 JB |
69 | %package apidocs |
70 | Summary: LEMON API documentation | |
71 | Summary(pl.UTF-8): Dokumentacja API biblioteki LEMON | |
72 | Group: Documentation | |
73 | ||
74 | %description apidocs | |
75 | API documentation for LEMON library. | |
76 | ||
77 | %description apidocs -l pl.UTF-8 | |
78 | Dokumentacja API biblioteki LEMON. | |
79 | ||
80 | %prep | |
81 | %setup -q | |
ec613515 | 82 | %patch0 -p1 |
b2972915 JB |
83 | |
84 | %build | |
d4a4dbb6 JB |
85 | install -d build |
86 | cd build | |
87 | %cmake .. \ | |
88 | %{!?with_coin:-DLEMON_ENABLE_COIN=OFF} \ | |
89 | %{!?with_glpk:-DLEMON_ENABLE_GLPK=OFF} \ | |
90 | %{!?with_cplex:-DLEMON_ENABLE_ILOG=OFF} \ | |
91 | %{!?with_soplex:-DLEMON_ENABLE_SOPLEX=OFF} | |
b2972915 JB |
92 | %{__make} |
93 | ||
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | ||
d4a4dbb6 | 97 | %{__make} -C build install \ |
b2972915 JB |
98 | DESTDIR=$RPM_BUILD_ROOT |
99 | ||
b2972915 JB |
100 | %clean |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
103 | %post -p /sbin/ldconfig | |
104 | %postun -p /sbin/ldconfig | |
105 | ||
106 | %files | |
107 | %defattr(644,root,root,755) | |
108 | %doc AUTHORS LICENSE NEWS README | |
109 | %attr(755,root,root) %{_bindir}/dimacs-solver | |
110 | %attr(755,root,root) %{_bindir}/dimacs-to-lgf | |
111 | %attr(755,root,root) %{_bindir}/lemon-0.x-to-1.x.sh | |
112 | %attr(755,root,root) %{_bindir}/lgf-gen | |
d4a4dbb6 | 113 | %attr(755,root,root) %{_libdir}/libemon.so.%{version} |
b2972915 JB |
114 | |
115 | %files devel | |
116 | %defattr(644,root,root,755) | |
117 | %attr(755,root,root) %{_libdir}/libemon.so | |
118 | %{_includedir}/lemon | |
119 | %{_pkgconfigdir}/lemon.pc | |
d4a4dbb6 JB |
120 | %dir %{_datadir}/lemon |
121 | %{_datadir}/lemon/cmake | |
b2972915 JB |
122 | |
123 | %files apidocs | |
124 | %defattr(644,root,root,755) | |
d4a4dbb6 | 125 | %{_docdir}/lemon |