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