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