]>
Commit | Line | Data |
---|---|---|
96826377 | 1 | # TODO: coin, soplex 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 JB |
6 | %bcond_without glpk # GLPK support |
7 | # | |
8 | Summary: Library of Efficient Models and Optimization in Networks | |
9 | Summary(pl.UTF-8): Biblioteka wydajnych modeli i optymalizacji w sieciach | |
10 | Name: lemon | |
11 | Version: 1.2.4 | |
12 | Release: 1 | |
13 | License: Boost v1.0 | |
14 | Group: Libraries | |
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 | |
26 | BuildRequires: python | |
27 | %{?with_glpk:Requires: glpk >= 4.33} | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
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 | |
35 | networks. | |
36 | ||
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 | |
43 | i sieciami. | |
44 | ||
45 | %package devel | |
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 | |
52 | ||
53 | %description devel | |
54 | Header files for LEMON library. | |
55 | ||
56 | %description devel -l pl.UTF-8 | |
57 | Pliki nagłówkowe biblioteki LEMON. | |
58 | ||
59 | %package static | |
60 | Summary: Static LEMON library | |
61 | Summary(pl.UTF-8): Statyczna biblioteka LEMON | |
62 | Group: Development/Libraries | |
63 | Requires: %{name}-devel = %{version}-%{release} | |
64 | ||
65 | %description static | |
66 | Static LEMON library. | |
67 | ||
68 | %description static -l pl.UTF-8 | |
69 | Statyczna biblioteka LEMON. | |
70 | ||
71 | %package apidocs | |
72 | Summary: LEMON API documentation | |
73 | Summary(pl.UTF-8): Dokumentacja API biblioteki LEMON | |
74 | Group: Documentation | |
75 | ||
76 | %description apidocs | |
77 | API documentation for LEMON library. | |
78 | ||
79 | %description apidocs -l pl.UTF-8 | |
80 | Dokumentacja API biblioteki LEMON. | |
81 | ||
82 | %prep | |
83 | %setup -q | |
84 | %patch0 -p1 | |
85 | ||
86 | %build | |
87 | %{__libtoolize} | |
88 | %{__aclocal} -I m4 | |
89 | %{__autoconf} | |
90 | %{__autoheader} | |
91 | %{__automake} | |
92 | %configure \ | |
93 | --enable-shared \ | |
94 | %{!?with_static_libs:--disable-static} \ | |
96826377 | 95 | %{!?with_cplex:--without-cplex} \ |
b2972915 JB |
96 | %{!?with_glpk:--without-glpk} |
97 | %{__make} | |
98 | ||
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %{__make} install \ | |
103 | DESTDIR=$RPM_BUILD_ROOT | |
104 | ||
105 | # obsoleted by pkg-config | |
106 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
107 | ||
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %post -p /sbin/ldconfig | |
112 | %postun -p /sbin/ldconfig | |
113 | ||
114 | %files | |
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 | |
123 | ||
124 | %files devel | |
125 | %defattr(644,root,root,755) | |
126 | %attr(755,root,root) %{_libdir}/libemon.so | |
127 | %{_includedir}/lemon | |
128 | %{_pkgconfigdir}/lemon.pc | |
129 | ||
130 | %if %{with static_libs} | |
131 | %files static | |
132 | %defattr(644,root,root,755) | |
133 | %{_libdir}/libemon.a | |
134 | %endif | |
135 | ||
136 | %files apidocs | |
137 | %defattr(644,root,root,755) | |
138 | %doc doc/html/* |