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