summaryrefslogtreecommitdiff
path: root/lemon.spec
blob: 1574b5f7b8a826c83ea4a12ae7cd4c469aaa0739 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# TODO: coin support
#
# Conditional build:
%bcond_without	static_libs	# don't build static libraries
%bcond_with	cplex		# CPLEX support [IBM proprietary]
%bcond_without	glpk		# GLPK support
%bcond_with	soplex		# SoPlex support
#
Summary:	Library of Efficient Models and Optimization in Networks
Summary(pl.UTF-8):	Biblioteka wydajnych modeli i optymalizacji w sieciach
Name:		lemon
Version:	1.2.4
Release:	1
License:	Boost v1.0
Group:		Libraries
Source0:	http://lemon.cs.elte.hu/pub/sources/%{name}-%{version}.tar.gz
# Source0-md5:	fd89e8bf5035b02e2622a48ac7fe0641
Patch0:		%{name}-glpk.patch
URL:		http://lemon.cs.elte.hu/
BuildRequires:	autoconf >= 2.59
BuildRequires:	automake
BuildRequires:	doxygen
BuildRequires:	ghostscript
%{?with_glpk:BuildRequires:	glpk-devel >= 4.33}
BuildRequires:	libstdc++-devel
BuildRequires:	libtool >= 2:1.5
BuildRequires:	python
%{?with_soplex:BuildRequires:	soplex-devel}
%{?with_glpk:Requires:	glpk >= 4.33}
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
LEMON stands for Library for Efficient Modeling and Optimization in
Networks. It is a C++ template library providing efficient
implementations of common data structures and algorithms with focus on
combinatorial optimization tasks connected mainly with graphs and
networks.

%description -l pl.UTF-8
LEMON to skrót od Library for Efficient Modeling and Optimization in
Networks (biblioteka do wydajnego modelowania i optymalizacji w
sieciach). Jest to biblioteka szablonów C++ udostępniająca wydajne
implementacje popularnych struktur danych i algorytmów przeznaczonych
do zadań optymalizacji kombinatorycznej, związanych głównie z grafami
i sieciami.

%package devel
Summary:	Header files for LEMON library
Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki LEMON
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
%{?with_glpk:Requires:	glpk-devel >= 4.33}
Requires:	libstdc++-devel
%{?with_soplex:Requires:	soplex-devel}

%description devel
Header files for LEMON library.

%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki LEMON.

%package static
Summary:	Static LEMON library
Summary(pl.UTF-8):	Statyczna biblioteka LEMON
Group:		Development/Libraries
Requires:	%{name}-devel = %{version}-%{release}

%description static
Static LEMON library.

%description static -l pl.UTF-8
Statyczna biblioteka LEMON.

%package apidocs
Summary:	LEMON API documentation
Summary(pl.UTF-8):	Dokumentacja API biblioteki LEMON
Group:		Documentation

%description apidocs
API documentation for LEMON library.

%description apidocs -l pl.UTF-8
Dokumentacja API biblioteki LEMON.

%prep
%setup -q
%patch0 -p1

%build
%{__libtoolize}
%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
%{__automake}
%configure \
	--enable-shared \
	%{!?with_static_libs:--disable-static} \
	%{!?with_cplex:--without-cplex} \
	%{!?with_glpk:--without-glpk} \
	%{!?with_soplex:--without-soplex} \
	%{?with_soplex:--with-soplex-includedir=/usr/include/soplex}

%{__make}

%install
rm -rf $RPM_BUILD_ROOT

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post	-p /sbin/ldconfig
%postun	-p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%doc AUTHORS LICENSE NEWS README
%attr(755,root,root) %{_bindir}/dimacs-solver
%attr(755,root,root) %{_bindir}/dimacs-to-lgf
%attr(755,root,root) %{_bindir}/lemon-0.x-to-1.x.sh
%attr(755,root,root) %{_bindir}/lgf-gen
%attr(755,root,root) %{_libdir}/libemon.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libemon.so.0

%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libemon.so
%{_includedir}/lemon
%{_pkgconfigdir}/lemon.pc

%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libemon.a
%endif

%files apidocs
%defattr(644,root,root,755)
%doc doc/html/*