]>
Commit | Line | Data |
---|---|---|
8367cb3b | 1 | # TODO: coin support |
b2972915 JB |
2 | # |
3 | # Conditional build: | |
4 | %bcond_without static_libs # don't build static libraries | |
96826377 | 5 | %bcond_with cplex # CPLEX support [IBM proprietary] |
b2972915 | 6 | %bcond_without glpk # GLPK support |
8367cb3b | 7 | %bcond_with soplex # SoPlex support |
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 | |
12 | Version: 1.2.4 | |
13 | Release: 1 | |
14 | License: Boost v1.0 | |
15 | Group: Libraries | |
16 | Source0: http://lemon.cs.elte.hu/pub/sources/%{name}-%{version}.tar.gz | |
17 | # Source0-md5: fd89e8bf5035b02e2622a48ac7fe0641 | |
18 | Patch0: %{name}-glpk.patch | |
19 | URL: http://lemon.cs.elte.hu/ | |
20 | BuildRequires: autoconf >= 2.59 | |
21 | BuildRequires: automake | |
22 | BuildRequires: doxygen | |
23 | BuildRequires: ghostscript | |
24 | %{?with_glpk:BuildRequires: glpk-devel >= 4.33} | |
25 | BuildRequires: libstdc++-devel | |
26 | BuildRequires: libtool >= 2:1.5 | |
27 | BuildRequires: python | |
8367cb3b | 28 | %{?with_soplex:BuildRequires: soplex-devel} |
b2972915 JB |
29 | %{?with_glpk:Requires: glpk >= 4.33} |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | LEMON stands for Library for Efficient Modeling and Optimization in | |
34 | Networks. It is a C++ template library providing efficient | |
35 | implementations of common data structures and algorithms with focus on | |
36 | combinatorial optimization tasks connected mainly with graphs and | |
37 | networks. | |
38 | ||
39 | %description -l pl.UTF-8 | |
40 | LEMON to skrót od Library for Efficient Modeling and Optimization in | |
41 | Networks (biblioteka do wydajnego modelowania i optymalizacji w | |
42 | sieciach). Jest to biblioteka szablonów C++ udostępniająca wydajne | |
43 | implementacje popularnych struktur danych i algorytmów przeznaczonych | |
44 | do zadań optymalizacji kombinatorycznej, związanych głównie z grafami | |
45 | i sieciami. | |
46 | ||
47 | %package devel | |
48 | Summary: Header files for LEMON library | |
49 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LEMON | |
50 | Group: Development/Libraries | |
51 | Requires: %{name} = %{version}-%{release} | |
52 | %{?with_glpk:Requires: glpk-devel >= 4.33} | |
53 | Requires: libstdc++-devel | |
8367cb3b | 54 | %{?with_soplex:Requires: soplex-devel} |
b2972915 JB |
55 | |
56 | %description devel | |
57 | Header files for LEMON library. | |
58 | ||
59 | %description devel -l pl.UTF-8 | |
60 | Pliki nagłówkowe biblioteki LEMON. | |
61 | ||
62 | %package static | |
63 | Summary: Static LEMON library | |
64 | Summary(pl.UTF-8): Statyczna biblioteka LEMON | |
65 | Group: Development/Libraries | |
66 | Requires: %{name}-devel = %{version}-%{release} | |
67 | ||
68 | %description static | |
69 | Static LEMON library. | |
70 | ||
71 | %description static -l pl.UTF-8 | |
72 | Statyczna biblioteka LEMON. | |
73 | ||
74 | %package apidocs | |
75 | Summary: LEMON API documentation | |
76 | Summary(pl.UTF-8): Dokumentacja API biblioteki LEMON | |
77 | Group: Documentation | |
78 | ||
79 | %description apidocs | |
80 | API documentation for LEMON library. | |
81 | ||
82 | %description apidocs -l pl.UTF-8 | |
83 | Dokumentacja API biblioteki LEMON. | |
84 | ||
85 | %prep | |
86 | %setup -q | |
87 | %patch0 -p1 | |
88 | ||
89 | %build | |
90 | %{__libtoolize} | |
91 | %{__aclocal} -I m4 | |
92 | %{__autoconf} | |
93 | %{__autoheader} | |
94 | %{__automake} | |
95 | %configure \ | |
96 | --enable-shared \ | |
97 | %{!?with_static_libs:--disable-static} \ | |
96826377 | 98 | %{!?with_cplex:--without-cplex} \ |
8367cb3b JB |
99 | %{!?with_glpk:--without-glpk} \ |
100 | %{!?with_soplex:--without-soplex} \ | |
101 | %{?with_soplex:--with-soplex-includedir=/usr/include/soplex} | |
102 | ||
b2972915 JB |
103 | %{__make} |
104 | ||
105 | %install | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %{__make} install \ | |
109 | DESTDIR=$RPM_BUILD_ROOT | |
110 | ||
111 | # obsoleted by pkg-config | |
112 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
113 | ||
114 | %clean | |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
117 | %post -p /sbin/ldconfig | |
118 | %postun -p /sbin/ldconfig | |
119 | ||
120 | %files | |
121 | %defattr(644,root,root,755) | |
122 | %doc AUTHORS LICENSE NEWS README | |
123 | %attr(755,root,root) %{_bindir}/dimacs-solver | |
124 | %attr(755,root,root) %{_bindir}/dimacs-to-lgf | |
125 | %attr(755,root,root) %{_bindir}/lemon-0.x-to-1.x.sh | |
126 | %attr(755,root,root) %{_bindir}/lgf-gen | |
127 | %attr(755,root,root) %{_libdir}/libemon.so.*.*.* | |
128 | %attr(755,root,root) %ghost %{_libdir}/libemon.so.0 | |
129 | ||
130 | %files devel | |
131 | %defattr(644,root,root,755) | |
132 | %attr(755,root,root) %{_libdir}/libemon.so | |
133 | %{_includedir}/lemon | |
134 | %{_pkgconfigdir}/lemon.pc | |
135 | ||
136 | %if %{with static_libs} | |
137 | %files static | |
138 | %defattr(644,root,root,755) | |
139 | %{_libdir}/libemon.a | |
140 | %endif | |
141 | ||
142 | %files apidocs | |
143 | %defattr(644,root,root,755) | |
144 | %doc doc/html/* |