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