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