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