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