]> git.pld-linux.org Git - packages/lemon.git/blob - lemon.spec
- added libdir patch
[packages/lemon.git] / lemon.spec
1 # TODO: coin support
2 #
3 # Conditional build:
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
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.3.1
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:  e89f887559113b68657eca67cf3329b5
18 Patch0:         %{name}-libdir.patch
19 URL:            http://lemon.cs.elte.hu/
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
30 BuildRequires:  cmake >= 2.8
31 BuildRequires:  doxygen
32 BuildRequires:  ghostscript
33 %{?with_glpk:BuildRequires:     glpk-devel >= 4.33}
34 BuildRequires:  libstdc++-devel
35 BuildRequires:  python
36 %{?with_soplex:BuildRequires:   soplex-devel}
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}
60 Requires:       libstdc++-devel
61 Obsoletes:      lemon-static
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
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
82 %patch0 -p1
83
84 %build
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}
92 %{__make}
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96
97 %{__make} -C build install \
98         DESTDIR=$RPM_BUILD_ROOT
99
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
113 %attr(755,root,root) %{_libdir}/libemon.so.%{version}
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
120 %dir %{_datadir}/lemon
121 %{_datadir}/lemon/cmake
122
123 %files apidocs
124 %defattr(644,root,root,755)
125 %{_docdir}/lemon
This page took 0.107053 seconds and 4 git commands to generate.