]>
Commit | Line | Data |
---|---|---|
26c3f184 | 1 | # |
2 | # Conditional build: | |
38968c27 JB |
3 | %bcond_without lua # Lua (5.1) bindings |
4 | %bcond_without perl # Perl bindings | |
5 | %bcond_without python # Python bindings (required by prewikka) | |
9bae6390 | 6 | %bcond_without ruby # Ruby bindings |
26c3f184 | 7 | # |
f1347e6d | 8 | %include /usr/lib/rpm/macros.perl |
6c16cb84 | 9 | Summary: The Prelude library |
6a1accbc | 10 | Summary(pl.UTF-8): Biblioteka Prelude |
f1347e6d | 11 | Name: libprelude |
30591219 | 12 | Version: 1.0.0 |
0f2bb1cb | 13 | Release: 5 |
d0949742 | 14 | License: GPL v2 or commercial |
f1347e6d | 15 | Group: Libraries |
24d829c8 JB |
16 | #Source0Download: http://www.prelude-ids.com/developpement/telechargement/index.html |
17 | Source0: http://www.prelude-ids.com/download/releases/libprelude/%{name}-%{version}.tar.gz | |
30591219 SP |
18 | # Source0-md5: a5bb76538d240e5fac5f6ab0b7fabfe5 |
19 | Patch0: %{name}-libtool.patch | |
38968c27 | 20 | Patch1: %{name}-ruby.patch |
24d829c8 | 21 | URL: http://www.prelude-ids.com/ |
d0949742 JB |
22 | BuildRequires: autoconf >= 2.59 |
23 | BuildRequires: automake | |
f1347e6d AM |
24 | BuildRequires: bison |
25 | BuildRequires: flex | |
9320b06b | 26 | BuildRequires: gnutls-devel >= 1.0.17 |
d0949742 JB |
27 | BuildRequires: gtk-doc >= 1.0 |
28 | BuildRequires: libgcrypt-devel >= 1.1.94 | |
38968c27 | 29 | BuildRequires: libltdl-devel >= 2:2.0 |
eb068d3a | 30 | BuildRequires: libstdc++-devel |
38968c27 JB |
31 | BuildRequires: libtool >= 2:2.0 |
32 | %{?with_lua:BuildRequires: lua51-devel >= 5.1} | |
9320b06b | 33 | %{?with_perl:BuildRequires: perl-devel} |
d0949742 | 34 | %{?with_python:BuildRequires: python-devel >= 1:2.5} |
f1347e6d | 35 | BuildRequires: rpm-perlprov |
d0949742 JB |
36 | BuildRequires: rpm-pythonprov |
37 | BuildRequires: rpmbuild(macros) >= 1.219 | |
9bae6390 | 38 | %{?with_ruby:BuildRequires: ruby-devel >= 1.9} |
38968c27 | 39 | BuildRequires: sed >= 4.0 |
30591219 | 40 | %{?with_perl:BuildRequires: swig-perl} |
38968c27 JB |
41 | %{?with_python:BuildRequires: swig-python} |
42 | %{?with_ruby:BuildRequires: swig-ruby} | |
d0949742 | 43 | Requires: %{name}-libs = %{version}-%{release} |
f1347e6d AM |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
46 | %description | |
6c16cb84 | 47 | The Prelude library is a collection of generic functions providing |
f1347e6d AM |
48 | communication between the Prelude Hybrid IDS suite components. It |
49 | provides a convenient interface for sending alerts to Prelude Manager | |
50 | with transparent SSL, failover and replication support, asynchronous | |
51 | events and timer interfaces, an abstracted configuration API (hooking | |
52 | at the commandline, the configuration line, or wide configuration, | |
53 | available from the Manager), and a generic plugin API. It allows you | |
54 | to easily turn your favorite security program into a Prelude sensor. | |
55 | ||
5db7d1dc JR |
56 | %description -l pl.UTF-8 |
57 | Biblioteka Prelude to zbiór ogólnych funkcji zapewniających | |
58 | komunikację pomiędzy komponentami zestawu Prelude Hybrid IDS. | |
59 | Dostarcza wygodny interfejs do wysyłania alarmów do zarządcy Prelude z | |
60 | przezroczystą obsługę SSL, failover i replikacji, interfejsy do | |
61 | zdarzeń asynchronicznych i zegarów, abstrakcyjne API konfiguracyjne | |
81042991 | 62 | (obsługujące linię poleceń, linię konfiguracji i konfigurację dostępną |
63 | z zarządcy) oraz ogólne API wtyczek. Pozwala łatwo zamienić ulubiony | |
64 | program związany z bezpieczeństwem na czujnik Prelude. | |
7758741a | 65 | |
f1347e6d | 66 | %package libs |
6c16cb84 | 67 | Summary: The Prelude library |
6a1accbc | 68 | Summary(pl.UTF-8): Biblioteka Prelude |
7758741a | 69 | Group: Libraries |
d0949742 JB |
70 | Requires: gnutls >= 1.0.17 |
71 | Requires: libgcrypt >= 1.1.94 | |
f1347e6d AM |
72 | |
73 | %description libs | |
6c16cb84 | 74 | The Prelude library. |
f1347e6d | 75 | |
5db7d1dc | 76 | %description libs -l pl.UTF-8 |
7758741a JB |
77 | Biblioteka Prelude. |
78 | ||
f1347e6d | 79 | %package devel |
7758741a | 80 | Summary: Header files and development documentation for libprelude |
6a1accbc | 81 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programistyczna dla libprelude |
f1347e6d | 82 | Group: Development/Libraries |
7758741a | 83 | Requires: %{name}-libs = %{version}-%{release} |
d0949742 JB |
84 | Requires: gnutls-devel >= 1.0.17 |
85 | Requires: libgcrypt-devel >= 1.1.94 | |
86 | Requires: libltdl-devel | |
f1347e6d AM |
87 | |
88 | %description devel | |
7758741a JB |
89 | Header files and development documentation for libprelude. |
90 | ||
5db7d1dc JR |
91 | %description devel -l pl.UTF-8 |
92 | Pliki nagłówkowe i dokumentacja programistyczna dla libprelude. | |
f1347e6d AM |
93 | |
94 | %package static | |
95 | Summary: Static libprelude library | |
6a1accbc | 96 | Summary(pl.UTF-8): Statyczna biblioteka libprelude |
f1347e6d | 97 | Group: Development/Libraries |
7758741a | 98 | Requires: %{name}-devel = %{version}-%{release} |
f1347e6d AM |
99 | |
100 | %description static | |
101 | Static libprelude library. | |
102 | ||
5db7d1dc | 103 | %description static -l pl.UTF-8 |
7758741a JB |
104 | Statyczna biblioteka libprelude. |
105 | ||
eb068d3a JB |
106 | %package c++ |
107 | Summary: libpreludecpp - C++ binding for libprelude | |
108 | Summary(pl.UTF-8): libpreludecpp - wiązanie C++ do libprelude | |
109 | Group: Libraries | |
110 | Requires: %{name}-libs = %{version}-%{release} | |
111 | ||
112 | %description c++ | |
113 | libpreludecpp - C++ binding for libprelude. | |
114 | ||
115 | %description c++ -l pl.UTF-8 | |
116 | libpreludecpp - wiązanie C++ do libprelude. | |
117 | ||
118 | %package c++-devel | |
119 | Summary: Header file for libpreludecpp library | |
120 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libpreludecpp | |
121 | Group: Development/Libraries | |
122 | Requires: %{name}-c++ = %{version}-%{release} | |
123 | Requires: %{name}-devel = %{version}-%{release} | |
124 | Requires: libstdc++-devel | |
125 | ||
126 | %description c++-devel | |
127 | Header file for libpreludecpp library - C++ binding for libprelude. | |
128 | ||
129 | %description c++-devel -l pl.UTF-8 | |
130 | Pliki nagłówkowe biblioteki libpreludecpp - wiązań C++ do libprelude. | |
131 | ||
132 | %package c++-static | |
133 | Summary: Static libpreludecpp library | |
134 | Summary(pl.UTF-8): Statyczna biblioteka libpreludecpp | |
135 | Group: Development/Libraries | |
136 | Requires: %{name}-c++-devel = %{version}-%{release} | |
137 | ||
138 | %description c++-static | |
139 | Static libpreludecpp library. | |
140 | ||
141 | %description c++-static -l pl.UTF-8 | |
142 | Statyczna biblioteka libpreludecpp. | |
143 | ||
38968c27 | 144 | %package -n lua-prelude |
9bae6390 JB |
145 | Summary: PreludeEasy - libprelude Lua bindings |
146 | Summary(pl.UTF-8): PreludeEasy - dowiązania języka Lua do libprelude | |
38968c27 | 147 | Group: Development/Languages |
eb068d3a | 148 | Requires: %{name}-c++ = %{version}-%{release} |
38968c27 JB |
149 | |
150 | %description -n lua-prelude | |
9bae6390 | 151 | PreludeEasy - libprelude Lua bindings. |
38968c27 JB |
152 | |
153 | %description -n lua-prelude -l pl.UTF-8 | |
9bae6390 | 154 | PreludeEasy - dowiązania języka Lua do libprelude. |
38968c27 | 155 | |
f1347e6d | 156 | %package -n perl-libprelude |
eb068d3a JB |
157 | Summary: Prelude Perl module - low-level Perl binding for libprelude |
158 | Summary(pl.UTF-8): Moduł Perla Prelude - niskopoziomowe wiązanie Perla do libprelude | |
f1347e6d | 159 | Group: Development/Languages/Perl |
d0949742 | 160 | Requires: %{name}-libs = %{version}-%{release} |
f1347e6d AM |
161 | |
162 | %description -n perl-libprelude | |
eb068d3a | 163 | Prelude Perl module - low-level Perl binding for libprelude. |
7758741a | 164 | |
5db7d1dc | 165 | %description -n perl-libprelude -l pl.UTF-8 |
eb068d3a JB |
166 | Moduł Perla Prelude - niskopoziomowe wiązanie Perla do libprelude. |
167 | ||
168 | %package -n perl-PreludeEasy | |
169 | Summary: PreludeEasy - high-level Perl binding for libprelude | |
170 | Summary(pl.UTF-8): PreludeEasy - wysokopoziomowe wiązanie Perla do libprelude | |
171 | Group: Development/Languages/Perl | |
172 | Requires: %{name}-c++ = %{version}-%{release} | |
173 | ||
174 | %description -n perl-PreludeEasy | |
175 | PreludeEasy - high-level Perl binding for libprelude. | |
176 | ||
177 | %description -n perl-PreludeEasy -l pl.UTF-8 | |
178 | PreludeEasy - wysokopoziomowe wiązanie Perla do libprelude. | |
f1347e6d AM |
179 | |
180 | %package -n python-libprelude | |
eb068d3a JB |
181 | Summary: Low-level Python binding for libprelude |
182 | Summary(pl.UTF-8): Niskopoziomowe wiązanie Pythona do libprelude | |
f1347e6d | 183 | Group: Development/Languages/Python |
d0949742 | 184 | Requires: %{name}-libs = %{version}-%{release} |
f1347e6d AM |
185 | |
186 | %description -n python-libprelude | |
eb068d3a | 187 | Low-level Python binding for libprelude. |
7758741a | 188 | |
5db7d1dc | 189 | %description -n python-libprelude -l pl.UTF-8 |
eb068d3a JB |
190 | Niskopoziomowe wiązanie Pythona do libprelude. |
191 | ||
192 | %package -n python-PreludeEasy | |
193 | Summary: PreludeEasy - high-level Python binding for libprelude | |
194 | Summary(pl.UTF-8): PreludeEasy - wysokopoziomowe wiązanie Pythona do libprelude | |
195 | Group: Development/Languages/Python | |
196 | Requires: %{name}-c++ = %{version}-%{release} | |
197 | ||
198 | %description -n python-PreludeEasy | |
199 | PreludeEasy - high-level Python binding for libprelude. | |
200 | ||
201 | %description -n python-PreludeEasy -l pl.UTF-8 | |
202 | PreludeEasy - wysokopoziomowe wiązanie Pythona do libprelude. | |
f1347e6d | 203 | |
9bae6390 JB |
204 | %package -n ruby-prelude |
205 | Summary: PreludeEasy - libprelude Ruby bindings | |
206 | Summary(pl.UTF-8): PreludeEasy - dowiązania języka Ruby do libprelude | |
207 | Group: Development/Languages | |
eb068d3a | 208 | Requires: %{name}-c++ = %{version}-%{release} |
9bae6390 JB |
209 | |
210 | %description -n ruby-prelude | |
211 | PreludeEasy - libprelude Ruby bindings. | |
212 | ||
213 | %description -n ruby-prelude -l pl.UTF-8 | |
214 | PreludeEasy - dowiązania języka Ruby do libprelude. | |
215 | ||
f1347e6d | 216 | %prep |
6de9ce54 | 217 | %setup -q |
30591219 | 218 | %patch0 -p1 |
38968c27 JB |
219 | |
220 | %if %{with python} | |
221 | # regenerate with fresh swig for gcc 4.6+ | |
222 | %{__rm} bindings/python/{_PreludeEasy.cxx,PreludeEasy.py} | |
223 | %endif | |
224 | %if %{with ruby} | |
225 | # same for ruby 1.9 | |
38968c27 | 226 | %{__rm} bindings/ruby/PreludeEasy.cxx |
9bae6390 | 227 | %patch1 -p1 |
38968c27 JB |
228 | %endif |
229 | ||
230 | sed -i -e 's/lua >= 5.1/lua51 >= 5.1/' configure.in | |
f1347e6d AM |
231 | |
232 | %build | |
d0949742 JB |
233 | %{__libtoolize} |
234 | %{__aclocal} -I m4 -I libmissing/m4 | |
235 | %{__autoconf} | |
236 | %{__autoheader} | |
237 | %{__automake} | |
f1347e6d | 238 | %configure \ |
f1347e6d | 239 | --enable-gtk-doc \ |
38968c27 JB |
240 | --enable-static \ |
241 | --with%{!?with_lua:out}-lua \ | |
f4f6dcd7 | 242 | --with%{!?with_perl:out}-perl \ |
243 | --with%{!?with_python:out}-python \ | |
d0949742 JB |
244 | --with-html-dir=%{_gtkdocdir}/libprelude \ |
245 | --with-perl-installdirs=vendor | |
6de9ce54 | 246 | |
f1347e6d AM |
247 | %{__make} |
248 | ||
249 | %install | |
250 | rm -rf $RPM_BUILD_ROOT | |
251 | ||
252 | %{__make} install \ | |
253 | DESTDIR=$RPM_BUILD_ROOT | |
254 | ||
eb068d3a JB |
255 | %if %{with perl} |
256 | # missing from make install | |
257 | [ ! -f $RPM_BUILD_ROOT%{perl_vendorarch}/PreludeEasy.pm ] || exit 1 | |
258 | cp -p bindings/perl/PreludeEasy.pm $RPM_BUILD_ROOT%{perl_vendorarch} | |
259 | %endif | |
9bae6390 JB |
260 | %if %{with lua} |
261 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/PreludeEasy.{la,a} | |
262 | %endif | |
9320b06b | 263 | %if %{with python} |
f1347e6d AM |
264 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
265 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
d0949742 | 266 | %py_postclean |
9320b06b | 267 | %endif |
9bae6390 JB |
268 | %if %{with ruby} |
269 | %{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/PreludeEasy.{la,a} | |
38968c27 | 270 | %endif |
f1347e6d AM |
271 | |
272 | %clean | |
273 | rm -rf $RPM_BUILD_ROOT | |
274 | ||
6c16cb84 | 275 | %post libs -p /sbin/ldconfig |
7758741a | 276 | %postun libs -p /sbin/ldconfig |
f1347e6d | 277 | |
eb068d3a JB |
278 | %post c++ -p /sbin/ldconfig |
279 | %postun c++ -p /sbin/ldconfig | |
280 | ||
f1347e6d AM |
281 | %files |
282 | %defattr(644,root,root,755) | |
d0949742 JB |
283 | %doc AUTHORS ChangeLog LICENSE.README NEWS README |
284 | %attr(755,root,root) %{_bindir}/prelude-adduser | |
285 | %attr(755,root,root) %{_bindir}/prelude-admin | |
f1347e6d AM |
286 | %dir %{_sysconfdir}/prelude |
287 | %dir %{_sysconfdir}/prelude/default | |
38968c27 JB |
288 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/client.conf |
289 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/global.conf | |
290 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/idmef-client.conf | |
291 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/tls.conf | |
f1347e6d | 292 | %dir %{_sysconfdir}/prelude/profile |
d0949742 | 293 | %{_mandir}/man1/prelude-admin.1* |
f1347e6d AM |
294 | |
295 | %files libs | |
296 | %defattr(644,root,root,755) | |
d0949742 JB |
297 | %attr(755,root,root) %{_libdir}/libprelude.so.*.*.* |
298 | %attr(755,root,root) %ghost %{_libdir}/libprelude.so.2 | |
f1347e6d AM |
299 | |
300 | %files devel | |
301 | %defattr(644,root,root,755) | |
302 | %attr(755,root,root) %{_bindir}/libprelude-config | |
d0949742 JB |
303 | %attr(755,root,root) %{_libdir}/libprelude.so |
304 | %{_libdir}/libprelude.la | |
eb068d3a JB |
305 | %dir %{_includedir}/libprelude |
306 | %{_includedir}/libprelude/*.h | |
d0949742 | 307 | %{_aclocaldir}/libprelude.m4 |
f1347e6d | 308 | %{_gtkdocdir}/libprelude |
81042991 | 309 | %{_pkgconfigdir}/libprelude.pc |
f1347e6d AM |
310 | |
311 | %files static | |
312 | %defattr(644,root,root,755) | |
d0949742 | 313 | %{_libdir}/libprelude.a |
eb068d3a JB |
314 | |
315 | %files c++ | |
316 | %defattr(644,root,root,755) | |
317 | %attr(755,root,root) %{_libdir}/libpreludecpp.so.*.*.* | |
318 | %attr(755,root,root) %ghost %{_libdir}/libpreludecpp.so.0 | |
319 | ||
320 | %files c++-devel | |
321 | %defattr(644,root,root,755) | |
322 | %attr(755,root,root) %{_libdir}/libpreludecpp.so | |
323 | %{_libdir}/libpreludecpp.la | |
324 | %{_includedir}/libprelude/idmef*.hxx | |
325 | %{_includedir}/libprelude/prelude*.hxx | |
326 | ||
327 | %files c++-static | |
328 | %defattr(644,root,root,755) | |
30591219 | 329 | %{_libdir}/libpreludecpp.a |
f1347e6d | 330 | |
38968c27 JB |
331 | %if %{with lua} |
332 | %files -n lua-prelude | |
333 | %defattr(644,root,root,755) | |
334 | %attr(755,root,root) %{_libdir}/PreludeEasy.so | |
335 | %endif | |
336 | ||
9320b06b | 337 | %if %{with perl} |
f1347e6d AM |
338 | %files -n perl-libprelude |
339 | %defattr(644,root,root,755) | |
f1347e6d | 340 | %{perl_vendorarch}/Prelude.pm |
d0949742 JB |
341 | %dir %{perl_vendorarch}/auto/Prelude |
342 | %{perl_vendorarch}/auto/Prelude/Prelude.bs | |
343 | %attr(755,root,root) %{perl_vendorarch}/auto/Prelude/Prelude.so | |
eb068d3a JB |
344 | |
345 | %files -n perl-PreludeEasy | |
346 | %defattr(644,root,root,755) | |
347 | %{perl_vendorarch}/PreludeEasy.pm | |
38968c27 JB |
348 | %dir %{perl_vendorarch}/auto/PreludeEasy |
349 | %{perl_vendorarch}/auto/PreludeEasy/PreludeEasy.bs | |
350 | %attr(755,root,root) %{perl_vendorarch}/auto/PreludeEasy/PreludeEasy.so | |
9320b06b | 351 | %endif |
f1347e6d | 352 | |
9320b06b | 353 | %if %{with python} |
f1347e6d AM |
354 | %files -n python-libprelude |
355 | %defattr(644,root,root,755) | |
d0949742 JB |
356 | %attr(755,root,root) %{py_sitedir}/_prelude.so |
357 | %{py_sitedir}/prelude.py[co] | |
eb068d3a JB |
358 | %{py_sitedir}/prelude-%{version}-py*.egg-info |
359 | ||
360 | %files -n python-PreludeEasy | |
361 | %defattr(644,root,root,755) | |
362 | %attr(755,root,root) %{py_sitedir}/_PreludeEasy.so | |
30591219 | 363 | %{py_sitedir}/PreludeEasy.py[co] |
eb068d3a | 364 | %{py_sitedir}/PreludeEasy-%{version}-py*.egg-info |
9320b06b | 365 | %endif |
9bae6390 JB |
366 | |
367 | %if %{with ruby} | |
368 | %files -n ruby-prelude | |
369 | %defattr(644,root,root,755) | |
370 | %attr(755,root,root) %{ruby_sitearchdir}/PreludeEasy.so | |
371 | %endif |