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