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