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
10 # 5.1 also possible, 5.2 is preferred
12 %define lua_pkg lua%(echo %{lua_ver} | tr -d .)
13 %include /usr/lib/rpm/macros.perl
14 Summary: The Prelude library
15 Summary(pl.UTF-8): Biblioteka Prelude
19 License: GPL v2 or commercial
21 #Source0Download: https://www.prelude-siem.org/projects/prelude/files
22 Source0: https://www.prelude-siem.org/attachments/download/831/%{name}-%{version}.tar.gz
23 # Source0-md5: d75977db58de9ba4cf9c4d00a0e25cb9
24 Patch0: python-install.patch
25 Patch1: %{name}-lua.patch
26 URL: https://www.prelude-siem.org/
27 BuildRequires: autoconf >= 2.59
28 BuildRequires: automake >= 1:1.9
31 BuildRequires: gnulib >= 0-0.20181013.2
32 BuildRequires: gnutls-devel >= 1.0.17
33 BuildRequires: gtk-doc >= 1.0
34 BuildRequires: libgcrypt-devel >= 1.1.94
35 BuildRequires: libltdl-devel >= 2:2.0
36 BuildRequires: libstdc++-devel
37 BuildRequires: libtool >= 2:2.0
38 %{?with_lua:BuildRequires: %{lua_pkg} >= %{lua_ver}}
39 %{?with_lua:BuildRequires: %{lua_pkg}-devel >= %{lua_ver}}
40 %{?with_perl:BuildRequires: perl-devel}
41 %{?with_python2:BuildRequires: python-devel >= 1:2.5}
42 %{?with_python3:BuildRequires: python3-devel >= 1:3.2}
43 BuildRequires: rpm-perlprov
44 BuildRequires: rpm-pythonprov
45 BuildRequires: rpmbuild(macros) >= 1.219
46 %{?with_ruby:BuildRequires: ruby-devel >= 1.9}
47 BuildRequires: sed >= 4.0
48 %{?with_perl:BuildRequires: swig-perl}
49 %{?with_python:BuildRequires: swig-python}
50 %{?with_ruby:BuildRequires: swig-ruby}
51 Requires: %{name}-libs = %{version}-%{release}
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 The Prelude library is a collection of generic functions providing
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.
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
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.
75 Summary: The Prelude library
76 Summary(pl.UTF-8): Biblioteka Prelude
78 Requires: gnutls >= 1.0.17
79 Requires: libgcrypt >= 1.1.94
84 %description libs -l pl.UTF-8
88 Summary: Header files and development documentation for libprelude
89 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programistyczna dla libprelude
90 Group: Development/Libraries
91 Requires: %{name}-libs = %{version}-%{release}
92 Requires: gnutls-devel >= 1.0.17
93 Requires: libgcrypt-devel >= 1.1.94
94 Requires: libltdl-devel
97 Header files and development documentation for libprelude.
99 %description devel -l pl.UTF-8
100 Pliki nagłówkowe i dokumentacja programistyczna dla libprelude.
103 Summary: Static libprelude library
104 Summary(pl.UTF-8): Statyczna biblioteka libprelude
105 Group: Development/Libraries
106 Requires: %{name}-devel = %{version}-%{release}
109 Static libprelude library.
111 %description static -l pl.UTF-8
112 Statyczna biblioteka libprelude.
115 Summary: libpreludecpp - C++ binding for libprelude
116 Summary(pl.UTF-8): libpreludecpp - wiązanie C++ do libprelude
118 Requires: %{name}-libs = %{version}-%{release}
121 libpreludecpp - C++ binding for libprelude.
123 %description c++ -l pl.UTF-8
124 libpreludecpp - wiązanie C++ do libprelude.
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
134 %description c++-devel
135 Header file for libpreludecpp library - C++ binding for libprelude.
137 %description c++-devel -l pl.UTF-8
138 Pliki nagłówkowe biblioteki libpreludecpp - wiązań C++ do libprelude.
141 Summary: Static libpreludecpp library
142 Summary(pl.UTF-8): Statyczna biblioteka libpreludecpp
143 Group: Development/Libraries
144 Requires: %{name}-c++-devel = %{version}-%{release}
146 %description c++-static
147 Static libpreludecpp library.
149 %description c++-static -l pl.UTF-8
150 Statyczna biblioteka libpreludecpp.
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}
160 SWIG development files for libprelude.
162 %description swig -l pl.UTF-8
163 Pliki programistyczne SWIG-a dla libprelude.
165 %package -n lua-prelude
166 Summary: PreludeEasy - libprelude Lua bindings
167 Summary(pl.UTF-8): PreludeEasy - dowiązania języka Lua do libprelude
168 Group: Development/Languages
169 Requires: %{name}-c++ = %{version}-%{release}
170 Requires: %{lua_pkg} >= %{lua_ver}
172 %description -n lua-prelude
173 PreludeEasy - libprelude Lua bindings.
175 %description -n lua-prelude -l pl.UTF-8
176 PreludeEasy - dowiązania języka Lua do libprelude.
178 %package -n perl-libprelude
179 Summary: Prelude Perl module - Perl binding for libprelude
180 Summary(pl.UTF-8): Moduł Perla Prelude - wiązanie Perla do libprelude
181 Group: Development/Languages/Perl
182 Requires: %{name}-c++ = %{version}-%{release}
183 Obsoletes: perl-PreludeEasy
185 %description -n perl-libprelude
186 Prelude Perl module - Perl binding for libprelude.
188 %description -n perl-libprelude -l pl.UTF-8
189 Moduł Perla Prelude - wiązanie Perla do libprelude.
191 %package -n python-libprelude
192 Summary: Python 2.x binding for libprelude
193 Summary(pl.UTF-8): Wiązanie Pythona 2.x do libprelude
194 Group: Development/Languages/Python
195 Requires: %{name}-c++ = %{version}-%{release}
196 Obsoletes: python-PreludeEasy
198 %description -n python-libprelude
199 Python 2.x binding for libprelude.
201 %description -n python-libprelude -l pl.UTF-8
202 Wiązanie Pythona 2.x do libprelude.
204 %package -n python3-libprelude
205 Summary: Python 3.x binding for libprelude
206 Summary(pl.UTF-8): Wiązanie Pythona 3.x do libprelude
207 Group: Development/Languages/Python
208 Requires: %{name}-c++ = %{version}-%{release}
210 %description -n python3-libprelude
211 Python 3.x binding for libprelude.
213 %description -n python3-libprelude -l pl.UTF-8
214 Wiązanie Pythona 3.x do libprelude.
216 %package -n ruby-prelude
217 Summary: Ruby bindings for libprelude
218 Summary(pl.UTF-8): Wiązania języka Ruby do libprelude
219 Group: Development/Languages
220 Requires: %{name}-c++ = %{version}-%{release}
222 %description -n ruby-prelude
223 Ruby bindings for libprelude.
225 %description -n ruby-prelude -l pl.UTF-8
226 Wiązania języka Ruby do libprelude.
234 # regenerate with fresh swig for python 3.5+
235 %{__rm} bindings/python/{_prelude.cxx,prelude.py}
239 gnulib-tool --copy-file lib/fseeko.c libmissing/fseeko.c
240 gnulib-tool --copy-file m4/fseeko.m4 libmissing/m4/fseeko.m4
243 %{__aclocal} -I m4 -I libmissing/m4
248 am_cv_ruby_rbexecdir=%{ruby_vendorarchdir} \
250 %{?with_static_libs:--enable-static} \
251 --with-html-dir=%{_gtkdocdir}/libprelude \
252 --with-lua%{!?with_lua:=no} \
253 --with-perl%{!?with_perl:=no} \
254 --with-perl-installdirs=vendor \
255 --with-python2%{!?with_python2:=no} \
256 --with-python3%{!?with_python3:=no} \
262 rm -rf $RPM_BUILD_ROOT
265 DESTDIR=$RPM_BUILD_ROOT \
266 pythondir=%{py_sitescriptdir} \
267 pyexecdir=%{py_sitedir} \
268 python3dir=%{py3_sitescriptdir} \
269 py3execdir=%{py3_sitedir}
272 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/%{lua_ver}/prelude.la \
273 %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/lua/%{lua_ver}/prelude.a}
279 %{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/Prelude.la \
280 %{?with_static_libs:$RPM_BUILD_ROOT%{ruby_vendorarchdir}/Prelude.a}
284 rm -rf $RPM_BUILD_ROOT
286 %post libs -p /sbin/ldconfig
287 %postun libs -p /sbin/ldconfig
289 %post c++ -p /sbin/ldconfig
290 %postun c++ -p /sbin/ldconfig
293 %defattr(644,root,root,755)
294 %doc AUTHORS ChangeLog LICENSE.README NEWS README
295 %attr(755,root,root) %{_bindir}/prelude-adduser
296 %attr(755,root,root) %{_bindir}/prelude-admin
297 %dir %{_sysconfdir}/prelude
298 %dir %{_sysconfdir}/prelude/default
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
303 %dir %{_sysconfdir}/prelude/profile
304 %{_mandir}/man1/prelude-admin.1*
307 %defattr(644,root,root,755)
308 %attr(755,root,root) %{_libdir}/libprelude.so.*.*.*
309 %attr(755,root,root) %ghost %{_libdir}/libprelude.so.23
312 %defattr(644,root,root,755)
313 %attr(755,root,root) %{_bindir}/libprelude-config
314 %attr(755,root,root) %{_libdir}/libprelude.so
315 %{_libdir}/libprelude.la
316 %dir %{_includedir}/libprelude
317 %{_includedir}/libprelude/*.h
318 %{_aclocaldir}/libprelude.m4
319 %{_gtkdocdir}/libprelude
320 %{_pkgconfigdir}/libprelude.pc
321 %{_mandir}/man1/libprelude-config.1*
323 %if %{with static_libs}
325 %defattr(644,root,root,755)
326 %{_libdir}/libprelude.a
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{_libdir}/libpreludecpp.so.*.*.*
332 %attr(755,root,root) %ghost %{_libdir}/libpreludecpp.so.8
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
341 %if %{with static_libs}
343 %defattr(644,root,root,755)
344 %{_libdir}/libpreludecpp.a
348 %defattr(644,root,root,755)
349 %dir %{_datadir}/libprelude
350 %{_datadir}/libprelude/swig
353 %files -n lua-prelude
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_libdir}/lua/%{lua_ver}/prelude.so
359 %files -n perl-libprelude
360 %defattr(644,root,root,755)
361 %{perl_vendorarch}/Prelude.pm
362 %dir %{perl_vendorarch}/auto/Prelude
363 %attr(755,root,root) %{perl_vendorarch}/auto/Prelude/Prelude.so
367 %files -n python-libprelude
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{py_sitedir}/_prelude.so
370 %{py_sitedir}/prelude.py[co]
371 %{py_sitedir}/prelude-%{version}-py*.egg-info
375 %files -n python3-libprelude
376 %defattr(644,root,root,755)
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
384 %files -n ruby-prelude
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{ruby_vendorarchdir}/Prelude.so