]> git.pld-linux.org Git - packages/libprelude.git/blob - libprelude.spec
5412ede0a09732bdcca86b22e1e8a9c7179258c7
[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:        5
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:  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)
53
54 %description
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.
63
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.
73
74 %package libs
75 Summary:        The Prelude library
76 Summary(pl.UTF-8):      Biblioteka Prelude
77 Group:          Libraries
78 Requires:       gnutls >= 1.0.17
79 Requires:       libgcrypt >= 1.1.94
80
81 %description libs
82 The Prelude library.
83
84 %description libs -l pl.UTF-8
85 Biblioteka Prelude.
86
87 %package devel
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
95
96 %description devel
97 Header files and development documentation for libprelude.
98
99 %description devel -l pl.UTF-8
100 Pliki nagłówkowe i dokumentacja programistyczna dla libprelude.
101
102 %package static
103 Summary:        Static libprelude library
104 Summary(pl.UTF-8):      Statyczna biblioteka libprelude
105 Group:          Development/Libraries
106 Requires:       %{name}-devel = %{version}-%{release}
107
108 %description static
109 Static libprelude library.
110
111 %description static -l pl.UTF-8
112 Statyczna biblioteka libprelude.
113
114 %package c++
115 Summary:        libpreludecpp - C++ binding for libprelude
116 Summary(pl.UTF-8):      libpreludecpp - wiązanie C++ do libprelude
117 Group:          Libraries
118 Requires:       %{name}-libs = %{version}-%{release}
119
120 %description c++
121 libpreludecpp - C++ binding for libprelude.
122
123 %description c++ -l pl.UTF-8
124 libpreludecpp - wiązanie C++ do libprelude.
125
126 %package c++-devel
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
133
134 %description c++-devel
135 Header file for libpreludecpp library - C++ binding for libprelude.
136
137 %description c++-devel -l pl.UTF-8
138 Pliki nagłówkowe biblioteki libpreludecpp - wiązań C++ do libprelude.
139
140 %package c++-static
141 Summary:        Static libpreludecpp library
142 Summary(pl.UTF-8):      Statyczna biblioteka libpreludecpp
143 Group:          Development/Libraries
144 Requires:       %{name}-c++-devel = %{version}-%{release}
145
146 %description c++-static
147 Static libpreludecpp library.
148
149 %description c++-static -l pl.UTF-8
150 Statyczna biblioteka libpreludecpp.
151
152 %package swig
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}
157 Requires:       swig
158
159 %description swig
160 SWIG development files for libprelude.
161
162 %description swig -l pl.UTF-8
163 Pliki programistyczne SWIG-a dla libprelude.
164
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}
171
172 %description -n lua-prelude
173 PreludeEasy - libprelude Lua bindings.
174
175 %description -n lua-prelude -l pl.UTF-8
176 PreludeEasy - dowiązania języka Lua do libprelude.
177
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
184
185 %description -n perl-libprelude
186 Prelude Perl module - Perl binding for libprelude.
187
188 %description -n perl-libprelude -l pl.UTF-8
189 Moduł Perla Prelude - wiązanie Perla do libprelude.
190
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
197
198 %description -n python-libprelude
199 Python 2.x binding for libprelude.
200
201 %description -n python-libprelude -l pl.UTF-8
202 Wiązanie Pythona 2.x do libprelude.
203
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}
209
210 %description -n python3-libprelude
211 Python 3.x binding for libprelude.
212
213 %description -n python3-libprelude -l pl.UTF-8
214 Wiązanie Pythona 3.x do libprelude.
215
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}
221
222 %description -n ruby-prelude
223 Ruby bindings for libprelude.
224
225 %description -n ruby-prelude -l pl.UTF-8
226 Wiązania języka Ruby do libprelude.
227
228 %prep
229 %setup -q
230 %patch0 -p1
231 %patch1 -p1
232
233 %if %{with python3}
234 # regenerate with fresh swig for python 3.5+
235 %{__rm} bindings/python/{_prelude.cxx,prelude.py}
236 %endif
237
238 %build
239 gnulib-tool --copy-file lib/fseeko.c libmissing/fseeko.c
240 gnulib-tool --copy-file m4/fseeko.m4 libmissing/m4/fseeko.m4
241 %{__gtkdocize}
242 %{__libtoolize}
243 %{__aclocal} -I m4 -I libmissing/m4
244 %{__autoconf}
245 %{__autoheader}
246 %{__automake}
247 %configure \
248         am_cv_ruby_rbexecdir=%{ruby_vendorarchdir} \
249         --enable-gtk-doc \
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} \
257         --with-swig
258
259 %{__make}
260
261 %install
262 rm -rf $RPM_BUILD_ROOT
263
264 %{__make} install \
265         DESTDIR=$RPM_BUILD_ROOT \
266         pythondir=%{py_sitescriptdir} \
267         pyexecdir=%{py_sitedir} \
268         python3dir=%{py3_sitescriptdir} \
269         py3execdir=%{py3_sitedir}
270
271 %if %{with lua}
272 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/%{lua_ver}/prelude.la \
273         %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/lua/%{lua_ver}/prelude.a}
274 %endif
275 %if %{with python2}
276 %py_postclean
277 %endif
278 %if %{with ruby}
279 %{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/Prelude.la \
280         %{?with_static_libs:$RPM_BUILD_ROOT%{ruby_vendorarchdir}/Prelude.a}
281 %endif
282
283 %clean
284 rm -rf $RPM_BUILD_ROOT
285
286 %post   libs -p /sbin/ldconfig
287 %postun libs -p /sbin/ldconfig
288
289 %post   c++ -p /sbin/ldconfig
290 %postun c++ -p /sbin/ldconfig
291
292 %files
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*
305
306 %files libs
307 %defattr(644,root,root,755)
308 %attr(755,root,root) %{_libdir}/libprelude.so.*.*.*
309 %attr(755,root,root) %ghost %{_libdir}/libprelude.so.23
310
311 %files devel
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*
322
323 %if %{with static_libs}
324 %files static
325 %defattr(644,root,root,755)
326 %{_libdir}/libprelude.a
327 %endif
328
329 %files c++
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{_libdir}/libpreludecpp.so.*.*.*
332 %attr(755,root,root) %ghost %{_libdir}/libpreludecpp.so.8
333
334 %files c++-devel
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
340
341 %if %{with static_libs}
342 %files c++-static
343 %defattr(644,root,root,755)
344 %{_libdir}/libpreludecpp.a
345 %endif
346
347 %files swig
348 %defattr(644,root,root,755)
349 %dir %{_datadir}/libprelude
350 %{_datadir}/libprelude/swig
351
352 %if %{with lua}
353 %files -n lua-prelude
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_libdir}/lua/%{lua_ver}/prelude.so
356 %endif
357
358 %if %{with perl}
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
364 %endif
365
366 %if %{with python2}
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
372 %endif
373
374 %if %{with python3}
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
381 %endif
382
383 %if %{with ruby}
384 %files -n ruby-prelude
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{ruby_vendorarchdir}/Prelude.so
387 %endif
This page took 0.077072 seconds and 2 git commands to generate.