]>
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 | # |
f1347e6d | 10 | %include /usr/lib/rpm/macros.perl |
6c16cb84 | 11 | Summary: The Prelude library |
6a1accbc | 12 | Summary(pl.UTF-8): Biblioteka Prelude |
f1347e6d | 13 | Name: libprelude |
25f258d7 JB |
14 | Version: 1.2.6 |
15 | Release: 1 | |
d0949742 | 16 | License: GPL v2 or commercial |
f1347e6d | 17 | Group: Libraries |
4ddd3a0d | 18 | # https://www.prelude-ids.org/projects/prelude/files |
25f258d7 JB |
19 | Source0: https://www.prelude-ids.org/attachments/download/410/%{name}-%{version}.tar.gz |
20 | # Source0-md5: 6a5aa32864ca6d74e1c7af0cdab7bf40 | |
21 | Patch0: python-install.patch | |
24d829c8 | 22 | URL: http://www.prelude-ids.com/ |
d0949742 JB |
23 | BuildRequires: autoconf >= 2.59 |
24 | BuildRequires: automake | |
f1347e6d AM |
25 | BuildRequires: bison |
26 | BuildRequires: flex | |
9320b06b | 27 | BuildRequires: gnutls-devel >= 1.0.17 |
d0949742 JB |
28 | BuildRequires: gtk-doc >= 1.0 |
29 | BuildRequires: libgcrypt-devel >= 1.1.94 | |
38968c27 | 30 | BuildRequires: libltdl-devel >= 2:2.0 |
eb068d3a | 31 | BuildRequires: libstdc++-devel |
38968c27 JB |
32 | BuildRequires: libtool >= 2:2.0 |
33 | %{?with_lua:BuildRequires: lua51-devel >= 5.1} | |
9320b06b | 34 | %{?with_perl:BuildRequires: perl-devel} |
25f258d7 JB |
35 | %{?with_python2:BuildRequires: python-devel >= 1:2.5} |
36 | %{?with_python3:BuildRequires: python3-devel >= 1:3.2} | |
f1347e6d | 37 | BuildRequires: rpm-perlprov |
d0949742 JB |
38 | BuildRequires: rpm-pythonprov |
39 | BuildRequires: rpmbuild(macros) >= 1.219 | |
9bae6390 | 40 | %{?with_ruby:BuildRequires: ruby-devel >= 1.9} |
38968c27 | 41 | BuildRequires: sed >= 4.0 |
30591219 | 42 | %{?with_perl:BuildRequires: swig-perl} |
38968c27 JB |
43 | %{?with_python:BuildRequires: swig-python} |
44 | %{?with_ruby:BuildRequires: swig-ruby} | |
d0949742 | 45 | Requires: %{name}-libs = %{version}-%{release} |
f1347e6d AM |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
47 | ||
48 | %description | |
6c16cb84 | 49 | The Prelude library is a collection of generic functions providing |
f1347e6d AM |
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 | ||
5db7d1dc JR |
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 | |
81042991 | 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. | |
7758741a | 67 | |
f1347e6d | 68 | %package libs |
6c16cb84 | 69 | Summary: The Prelude library |
6a1accbc | 70 | Summary(pl.UTF-8): Biblioteka Prelude |
7758741a | 71 | Group: Libraries |
d0949742 JB |
72 | Requires: gnutls >= 1.0.17 |
73 | Requires: libgcrypt >= 1.1.94 | |
f1347e6d AM |
74 | |
75 | %description libs | |
6c16cb84 | 76 | The Prelude library. |
f1347e6d | 77 | |
5db7d1dc | 78 | %description libs -l pl.UTF-8 |
7758741a JB |
79 | Biblioteka Prelude. |
80 | ||
f1347e6d | 81 | %package devel |
7758741a | 82 | Summary: Header files and development documentation for libprelude |
6a1accbc | 83 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programistyczna dla libprelude |
f1347e6d | 84 | Group: Development/Libraries |
7758741a | 85 | Requires: %{name}-libs = %{version}-%{release} |
d0949742 JB |
86 | Requires: gnutls-devel >= 1.0.17 |
87 | Requires: libgcrypt-devel >= 1.1.94 | |
88 | Requires: libltdl-devel | |
f1347e6d AM |
89 | |
90 | %description devel | |
7758741a JB |
91 | Header files and development documentation for libprelude. |
92 | ||
5db7d1dc JR |
93 | %description devel -l pl.UTF-8 |
94 | Pliki nagłówkowe i dokumentacja programistyczna dla libprelude. | |
f1347e6d AM |
95 | |
96 | %package static | |
97 | Summary: Static libprelude library | |
6a1accbc | 98 | Summary(pl.UTF-8): Statyczna biblioteka libprelude |
f1347e6d | 99 | Group: Development/Libraries |
7758741a | 100 | Requires: %{name}-devel = %{version}-%{release} |
f1347e6d AM |
101 | |
102 | %description static | |
103 | Static libprelude library. | |
104 | ||
5db7d1dc | 105 | %description static -l pl.UTF-8 |
7758741a JB |
106 | Statyczna biblioteka libprelude. |
107 | ||
eb068d3a JB |
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 | ||
38968c27 | 146 | %package -n lua-prelude |
9bae6390 JB |
147 | Summary: PreludeEasy - libprelude Lua bindings |
148 | Summary(pl.UTF-8): PreludeEasy - dowiązania języka Lua do libprelude | |
38968c27 | 149 | Group: Development/Languages |
eb068d3a | 150 | Requires: %{name}-c++ = %{version}-%{release} |
38968c27 JB |
151 | |
152 | %description -n lua-prelude | |
9bae6390 | 153 | PreludeEasy - libprelude Lua bindings. |
38968c27 JB |
154 | |
155 | %description -n lua-prelude -l pl.UTF-8 | |
9bae6390 | 156 | PreludeEasy - dowiązania języka Lua do libprelude. |
38968c27 | 157 | |
f1347e6d | 158 | %package -n perl-libprelude |
eb068d3a JB |
159 | Summary: Prelude Perl module - low-level Perl binding for libprelude |
160 | Summary(pl.UTF-8): Moduł Perla Prelude - niskopoziomowe wiązanie Perla do libprelude | |
f1347e6d | 161 | Group: Development/Languages/Perl |
d0949742 | 162 | Requires: %{name}-libs = %{version}-%{release} |
25f258d7 | 163 | Obsoletes: perl-PreludeEasy |
f1347e6d AM |
164 | |
165 | %description -n perl-libprelude | |
eb068d3a | 166 | Prelude Perl module - low-level Perl binding for libprelude. |
7758741a | 167 | |
5db7d1dc | 168 | %description -n perl-libprelude -l pl.UTF-8 |
eb068d3a JB |
169 | Moduł Perla Prelude - niskopoziomowe wiązanie Perla do libprelude. |
170 | ||
f1347e6d | 171 | %package -n python-libprelude |
25f258d7 JB |
172 | Summary: Low-level Python 2.x binding for libprelude |
173 | Summary(pl.UTF-8): Niskopoziomowe wiązanie Pythona 2.x do libprelude | |
f1347e6d | 174 | Group: Development/Languages/Python |
d0949742 | 175 | Requires: %{name}-libs = %{version}-%{release} |
25f258d7 | 176 | Obsoletes: python-PreludeEasy |
f1347e6d AM |
177 | |
178 | %description -n python-libprelude | |
25f258d7 | 179 | Low-level Python 2.x binding for libprelude. |
7758741a | 180 | |
5db7d1dc | 181 | %description -n python-libprelude -l pl.UTF-8 |
25f258d7 | 182 | Niskopoziomowe wiązanie Pythona 2.x do libprelude. |
eb068d3a | 183 | |
25f258d7 JB |
184 | %package -n python3-libprelude |
185 | Summary: Low-level Python 3.x binding for libprelude | |
186 | Summary(pl.UTF-8): Niskopoziomowe wiązanie Pythona 3.x do libprelude | |
eb068d3a | 187 | Group: Development/Languages/Python |
25f258d7 | 188 | Requires: %{name}-libs = %{version}-%{release} |
eb068d3a | 189 | |
25f258d7 JB |
190 | %description -n python3-libprelude |
191 | Low-level Python 3.x binding for libprelude. | |
eb068d3a | 192 | |
25f258d7 JB |
193 | %description -n python3-libprelude -l pl.UTF-8 |
194 | Niskopoziomowe wiązanie Pythona 3.x do libprelude. | |
f1347e6d | 195 | |
9bae6390 JB |
196 | %package -n ruby-prelude |
197 | Summary: PreludeEasy - libprelude Ruby bindings | |
198 | Summary(pl.UTF-8): PreludeEasy - dowiązania języka Ruby do libprelude | |
199 | Group: Development/Languages | |
eb068d3a | 200 | Requires: %{name}-c++ = %{version}-%{release} |
9bae6390 JB |
201 | |
202 | %description -n ruby-prelude | |
203 | PreludeEasy - libprelude Ruby bindings. | |
204 | ||
205 | %description -n ruby-prelude -l pl.UTF-8 | |
206 | PreludeEasy - dowiązania języka Ruby do libprelude. | |
207 | ||
f1347e6d | 208 | %prep |
6de9ce54 | 209 | %setup -q |
30591219 | 210 | %patch0 -p1 |
38968c27 | 211 | |
25f258d7 JB |
212 | %if %{with python3} |
213 | # regenerate with fresh swig for python 3.5+ | |
214 | %{__rm} bindings/python/{_prelude.cxx,prelude.py} | |
38968c27 | 215 | %endif |
4ddd3a0d | 216 | |
25f258d7 | 217 | %{__sed} -i -e 's/lua >= 5.1/lua51 >= 5.1/;s/lua -e/lua5.1 -e/' configure.in |
f1347e6d AM |
218 | |
219 | %build | |
d0949742 JB |
220 | %{__libtoolize} |
221 | %{__aclocal} -I m4 -I libmissing/m4 | |
222 | %{__autoconf} | |
223 | %{__autoheader} | |
224 | %{__automake} | |
f1347e6d | 225 | %configure \ |
62e43182 | 226 | am_cv_ruby_rbexecdir=%{ruby_vendorarchdir} \ |
f1347e6d | 227 | --enable-gtk-doc \ |
25f258d7 | 228 | %{?with_static_libs:--enable-static} \ |
d0949742 | 229 | --with-html-dir=%{_gtkdocdir}/libprelude \ |
25f258d7 JB |
230 | --with-lua%{!?with_lua:=no} \ |
231 | --with-perl%{!?with_perl:=no} \ | |
232 | --with-perl-installdirs=vendor \ | |
233 | --with-python%{!?with_python2:=no} \ | |
234 | --with-python3%{!?with_python3:=no} \ | |
235 | --with-swig | |
6de9ce54 | 236 | |
f1347e6d AM |
237 | %{__make} |
238 | ||
25f258d7 JB |
239 | #cd bindings/perl |
240 | #%{__make} clean | |
241 | #%{__perl} Makefile.PL \ | |
242 | # INSTALLDIRS=vendor \ | |
243 | #%{__make} | |
62e43182 | 244 | |
f1347e6d AM |
245 | %install |
246 | rm -rf $RPM_BUILD_ROOT | |
247 | ||
248 | %{__make} install \ | |
25f258d7 JB |
249 | DESTDIR=$RPM_BUILD_ROOT \ |
250 | pythondir=%{py_sitescriptdir} \ | |
251 | pyexecdir=%{py_sitedir} \ | |
252 | python3dir=%{py3_sitescriptdir} \ | |
253 | py3execdir=%{py3_sitedir} | |
f1347e6d | 254 | |
25f258d7 JB |
255 | #%{__make} -C bindings/perl install \ |
256 | # DESTDIR=$RPM_BUILD_ROOT | |
62e43182 | 257 | |
9bae6390 | 258 | %if %{with lua} |
25f258d7 JB |
259 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.1/prelude.la \ |
260 | %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/lua/5.1/prelude.a} | |
9bae6390 | 261 | %endif |
25f258d7 | 262 | %if %{with python2} |
d0949742 | 263 | %py_postclean |
9320b06b | 264 | %endif |
9bae6390 | 265 | %if %{with ruby} |
25f258d7 JB |
266 | %{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/Prelude.la \ |
267 | %{?with_static_libs:$RPM_BUILD_ROOT%{ruby_vendorarchdir}/Prelude.a} | |
38968c27 | 268 | %endif |
f1347e6d | 269 | |
25f258d7 JB |
270 | # not useful in distro? (or -swig?) |
271 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/libprelude/swig | |
272 | ||
f1347e6d AM |
273 | %clean |
274 | rm -rf $RPM_BUILD_ROOT | |
275 | ||
6c16cb84 | 276 | %post libs -p /sbin/ldconfig |
7758741a | 277 | %postun libs -p /sbin/ldconfig |
f1347e6d | 278 | |
eb068d3a JB |
279 | %post c++ -p /sbin/ldconfig |
280 | %postun c++ -p /sbin/ldconfig | |
281 | ||
f1347e6d AM |
282 | %files |
283 | %defattr(644,root,root,755) | |
d0949742 JB |
284 | %doc AUTHORS ChangeLog LICENSE.README NEWS README |
285 | %attr(755,root,root) %{_bindir}/prelude-adduser | |
286 | %attr(755,root,root) %{_bindir}/prelude-admin | |
f1347e6d AM |
287 | %dir %{_sysconfdir}/prelude |
288 | %dir %{_sysconfdir}/prelude/default | |
38968c27 JB |
289 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/client.conf |
290 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/global.conf | |
291 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/idmef-client.conf | |
292 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/tls.conf | |
f1347e6d | 293 | %dir %{_sysconfdir}/prelude/profile |
d0949742 | 294 | %{_mandir}/man1/prelude-admin.1* |
f1347e6d AM |
295 | |
296 | %files libs | |
297 | %defattr(644,root,root,755) | |
d0949742 | 298 | %attr(755,root,root) %{_libdir}/libprelude.so.*.*.* |
25f258d7 | 299 | %attr(755,root,root) %ghost %{_libdir}/libprelude.so.23 |
f1347e6d AM |
300 | |
301 | %files devel | |
302 | %defattr(644,root,root,755) | |
303 | %attr(755,root,root) %{_bindir}/libprelude-config | |
d0949742 JB |
304 | %attr(755,root,root) %{_libdir}/libprelude.so |
305 | %{_libdir}/libprelude.la | |
eb068d3a JB |
306 | %dir %{_includedir}/libprelude |
307 | %{_includedir}/libprelude/*.h | |
d0949742 | 308 | %{_aclocaldir}/libprelude.m4 |
f1347e6d | 309 | %{_gtkdocdir}/libprelude |
81042991 | 310 | %{_pkgconfigdir}/libprelude.pc |
f1347e6d | 311 | |
25f258d7 | 312 | %if %{with static_libs} |
f1347e6d AM |
313 | %files static |
314 | %defattr(644,root,root,755) | |
d0949742 | 315 | %{_libdir}/libprelude.a |
25f258d7 | 316 | %endif |
eb068d3a JB |
317 | |
318 | %files c++ | |
319 | %defattr(644,root,root,755) | |
320 | %attr(755,root,root) %{_libdir}/libpreludecpp.so.*.*.* | |
25f258d7 | 321 | %attr(755,root,root) %ghost %{_libdir}/libpreludecpp.so.8 |
eb068d3a JB |
322 | |
323 | %files c++-devel | |
324 | %defattr(644,root,root,755) | |
325 | %attr(755,root,root) %{_libdir}/libpreludecpp.so | |
326 | %{_libdir}/libpreludecpp.la | |
327 | %{_includedir}/libprelude/idmef*.hxx | |
328 | %{_includedir}/libprelude/prelude*.hxx | |
329 | ||
25f258d7 | 330 | %if %{with static_libs} |
eb068d3a JB |
331 | %files c++-static |
332 | %defattr(644,root,root,755) | |
30591219 | 333 | %{_libdir}/libpreludecpp.a |
25f258d7 | 334 | %endif |
f1347e6d | 335 | |
38968c27 JB |
336 | %if %{with lua} |
337 | %files -n lua-prelude | |
338 | %defattr(644,root,root,755) | |
25f258d7 | 339 | %attr(755,root,root) %{_libdir}/lua/5.1/prelude.so |
38968c27 JB |
340 | %endif |
341 | ||
9320b06b | 342 | %if %{with perl} |
f1347e6d AM |
343 | %files -n perl-libprelude |
344 | %defattr(644,root,root,755) | |
f1347e6d | 345 | %{perl_vendorarch}/Prelude.pm |
d0949742 | 346 | %dir %{perl_vendorarch}/auto/Prelude |
d0949742 | 347 | %attr(755,root,root) %{perl_vendorarch}/auto/Prelude/Prelude.so |
9320b06b | 348 | %endif |
f1347e6d | 349 | |
25f258d7 | 350 | %if %{with python2} |
f1347e6d AM |
351 | %files -n python-libprelude |
352 | %defattr(644,root,root,755) | |
d0949742 JB |
353 | %attr(755,root,root) %{py_sitedir}/_prelude.so |
354 | %{py_sitedir}/prelude.py[co] | |
eb068d3a | 355 | %{py_sitedir}/prelude-%{version}-py*.egg-info |
25f258d7 | 356 | %endif |
eb068d3a | 357 | |
25f258d7 JB |
358 | %if %{with python3} |
359 | %files -n python3-libprelude | |
eb068d3a | 360 | %defattr(644,root,root,755) |
25f258d7 JB |
361 | %attr(755,root,root) %{py3_sitedir}/_prelude.cpython-*.so |
362 | %{py3_sitedir}/prelude.py | |
363 | %{py3_sitedir}/__pycache__/prelude.cpython-*.py[co] | |
364 | %{py3_sitedir}/prelude-%{version}-py*.egg-info | |
9320b06b | 365 | %endif |
9bae6390 JB |
366 | |
367 | %if %{with ruby} | |
368 | %files -n ruby-prelude | |
369 | %defattr(644,root,root,755) | |
25f258d7 | 370 | %attr(755,root,root) %{ruby_vendorarchdir}/Prelude.so |
9bae6390 | 371 | %endif |