]> git.pld-linux.org Git - packages/libprelude.git/blob - libprelude.spec
dd542e4994e078e02b54491fd6b5ab41647f7f43
[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  python  # Python bindings (required by prewikka)
6 %bcond_without  ruby    # Ruby bindings
7 #
8 %include        /usr/lib/rpm/macros.perl
9 Summary:        The Prelude library
10 Summary(pl.UTF-8):      Biblioteka Prelude
11 Name:           libprelude
12 Version:        1.0.1
13 Release:        13
14 License:        GPL v2 or commercial
15 Group:          Libraries
16 # https://www.prelude-ids.org/projects/prelude/files
17 Source0:        https://www.prelude-ids.org/attachments/download/241/%{name}-%{version}.tar.gz
18 # Source0-md5:  dce1ea9f82cf436830567894e7ee622f
19 Patch0:         %{name}-libtool.patch
20 Patch1:         %{name}-ruby.patch
21 Patch2:         %{name}-gnutls.patch
22 Patch3:         %{name}-gets.patch
23 Patch4:         %{name}-python.patch
24 Patch5:         format-security.patch
25 Patch6:         python-install.patch
26 Patch7:         gcc5.patch
27 Patch8:         swig.patch
28 URL:            http://www.prelude-ids.com/
29 BuildRequires:  autoconf >= 2.59
30 BuildRequires:  automake
31 BuildRequires:  bison
32 BuildRequires:  flex
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:      lua51-devel >= 5.1}
40 %{?with_perl:BuildRequires:     perl-devel}
41 %{?with_python:BuildRequires:   python-devel >= 1:2.5}
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 -n lua-prelude
152 Summary:        PreludeEasy - libprelude Lua bindings
153 Summary(pl.UTF-8):      PreludeEasy - dowiązania języka Lua do libprelude
154 Group:          Development/Languages
155 Requires:       %{name}-c++ = %{version}-%{release}
156
157 %description -n lua-prelude
158 PreludeEasy - libprelude Lua bindings.
159
160 %description -n lua-prelude -l pl.UTF-8
161 PreludeEasy - dowiązania języka Lua do libprelude.
162
163 %package -n perl-libprelude
164 Summary:        Prelude Perl module - low-level Perl binding for libprelude
165 Summary(pl.UTF-8):      Moduł Perla Prelude - niskopoziomowe wiązanie Perla do libprelude
166 Group:          Development/Languages/Perl
167 Requires:       %{name}-libs = %{version}-%{release}
168
169 %description -n perl-libprelude
170 Prelude Perl module - low-level Perl binding for libprelude.
171
172 %description -n perl-libprelude -l pl.UTF-8
173 Moduł Perla Prelude - niskopoziomowe wiązanie Perla do libprelude.
174
175 %package -n perl-PreludeEasy
176 Summary:        PreludeEasy - high-level Perl binding for libprelude
177 Summary(pl.UTF-8):      PreludeEasy - wysokopoziomowe wiązanie Perla do libprelude
178 Group:          Development/Languages/Perl
179 Requires:       %{name}-c++ = %{version}-%{release}
180
181 %description -n perl-PreludeEasy
182 PreludeEasy - high-level Perl binding for libprelude.
183
184 %description -n perl-PreludeEasy -l pl.UTF-8
185 PreludeEasy - wysokopoziomowe wiązanie Perla do libprelude.
186
187 %package -n python-libprelude
188 Summary:        Low-level Python binding for libprelude
189 Summary(pl.UTF-8):      Niskopoziomowe wiązanie Pythona do libprelude
190 Group:          Development/Languages/Python
191 Requires:       %{name}-libs = %{version}-%{release}
192
193 %description -n python-libprelude
194 Low-level Python binding for libprelude.
195
196 %description -n python-libprelude -l pl.UTF-8
197 Niskopoziomowe wiązanie Pythona do libprelude.
198
199 %package -n python-PreludeEasy
200 Summary:        PreludeEasy - high-level Python binding for libprelude
201 Summary(pl.UTF-8):      PreludeEasy - wysokopoziomowe wiązanie Pythona do libprelude
202 Group:          Development/Languages/Python
203 Requires:       %{name}-c++ = %{version}-%{release}
204
205 %description -n python-PreludeEasy
206 PreludeEasy - high-level Python binding for libprelude.
207
208 %description -n python-PreludeEasy -l pl.UTF-8
209 PreludeEasy - wysokopoziomowe wiązanie Pythona do libprelude.
210
211 %package -n ruby-prelude
212 Summary:        PreludeEasy - libprelude Ruby bindings
213 Summary(pl.UTF-8):      PreludeEasy - dowiązania języka Ruby do libprelude
214 Group:          Development/Languages
215 Requires:       %{name}-c++ = %{version}-%{release}
216
217 %description -n ruby-prelude
218 PreludeEasy - libprelude Ruby bindings.
219
220 %description -n ruby-prelude -l pl.UTF-8
221 PreludeEasy - dowiązania języka Ruby do libprelude.
222
223 %prep
224 %setup -q
225 %patch0 -p1
226
227 %if %{with python}
228 # regenerate with fresh swig for gcc 4.6+
229 %{__rm} bindings/python/{_PreludeEasy.cxx,PreludeEasy.py}
230 %endif
231 %if %{with ruby}
232 # same for ruby 1.9
233 %{__rm} bindings/ruby/PreludeEasy.cxx
234 %patch1 -p1
235 %endif
236 %if %{with perl}
237 # regenerate with fresh swig for perl 5.20
238 %{__rm} bindings/low-level/perl/Prelude.c
239 %endif
240
241 %patch2 -p1
242 %patch3 -p1
243 %patch4 -p1
244 %patch5 -p1
245 %patch6 -p1
246 %patch7 -p1
247 %patch8 -p1
248
249 sed -i -e 's/lua >= 5.1/lua51 >= 5.1/' configure.in
250
251 %build
252 %{__libtoolize}
253 %{__aclocal} -I m4 -I libmissing/m4
254 %{__autoconf}
255 %{__autoheader}
256 %{__automake}
257 %configure \
258         am_cv_ruby_rbexecdir=%{ruby_vendorarchdir} \
259         --enable-gtk-doc \
260         --enable-static \
261         --with%{!?with_lua:out}-lua \
262         --with%{!?with_perl:out}-perl \
263         --with%{!?with_python:out}-python \
264         --with-html-dir=%{_gtkdocdir}/libprelude \
265         --with-perl-installdirs=vendor
266
267 %{__make}
268
269 cd bindings/perl
270 %{__make} clean
271 %{__perl} Makefile.PL \
272         INSTALLDIRS=vendor \
273 %{__make}
274
275 %install
276 rm -rf $RPM_BUILD_ROOT
277
278 %{__make} install \
279         DESTDIR=$RPM_BUILD_ROOT
280
281 %{__make} -C bindings/perl install \
282         DESTDIR=$RPM_BUILD_ROOT
283
284 %if %{with lua}
285 %{__rm} $RPM_BUILD_ROOT%{_libdir}/PreludeEasy.{la,a}
286 %endif
287 %if %{with python}
288 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
289 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
290 %py_postclean
291 %endif
292 %if %{with ruby}
293 %{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/PreludeEasy.{la,a}
294 %endif
295
296 %clean
297 rm -rf $RPM_BUILD_ROOT
298
299 %post   libs -p /sbin/ldconfig
300 %postun libs -p /sbin/ldconfig
301
302 %post   c++ -p /sbin/ldconfig
303 %postun c++ -p /sbin/ldconfig
304
305 %files
306 %defattr(644,root,root,755)
307 %doc AUTHORS ChangeLog LICENSE.README NEWS README
308 %attr(755,root,root) %{_bindir}/prelude-adduser
309 %attr(755,root,root) %{_bindir}/prelude-admin
310 %dir %{_sysconfdir}/prelude
311 %dir %{_sysconfdir}/prelude/default
312 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/client.conf
313 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/global.conf
314 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/idmef-client.conf
315 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/tls.conf
316 %dir %{_sysconfdir}/prelude/profile
317 %{_mandir}/man1/prelude-admin.1*
318
319 %files libs
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/libprelude.so.*.*.*
322 %attr(755,root,root) %ghost %{_libdir}/libprelude.so.2
323
324 %files devel
325 %defattr(644,root,root,755)
326 %attr(755,root,root) %{_bindir}/libprelude-config
327 %attr(755,root,root) %{_libdir}/libprelude.so
328 %{_libdir}/libprelude.la
329 %dir %{_includedir}/libprelude
330 %{_includedir}/libprelude/*.h
331 %{_aclocaldir}/libprelude.m4
332 %{_gtkdocdir}/libprelude
333 %{_pkgconfigdir}/libprelude.pc
334
335 %files static
336 %defattr(644,root,root,755)
337 %{_libdir}/libprelude.a
338
339 %files c++
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_libdir}/libpreludecpp.so.*.*.*
342 %attr(755,root,root) %ghost %{_libdir}/libpreludecpp.so.0
343
344 %files c++-devel
345 %defattr(644,root,root,755)
346 %attr(755,root,root) %{_libdir}/libpreludecpp.so
347 %{_libdir}/libpreludecpp.la
348 %{_includedir}/libprelude/idmef*.hxx
349 %{_includedir}/libprelude/prelude*.hxx
350
351 %files c++-static
352 %defattr(644,root,root,755)
353 %{_libdir}/libpreludecpp.a
354
355 %if %{with lua}
356 %files -n lua-prelude
357 %defattr(644,root,root,755)
358 %attr(755,root,root) %{_libdir}/PreludeEasy.so
359 %endif
360
361 %if %{with perl}
362 %files -n perl-libprelude
363 %defattr(644,root,root,755)
364 %{perl_vendorarch}/Prelude.pm
365 %dir %{perl_vendorarch}/auto/Prelude
366 %attr(755,root,root) %{perl_vendorarch}/auto/Prelude/Prelude.so
367
368 %files -n perl-PreludeEasy
369 %defattr(644,root,root,755)
370 %{perl_vendorarch}/PreludeEasy.pm
371 %dir %{perl_vendorarch}/auto/PreludeEasy
372 %attr(755,root,root) %{perl_vendorarch}/auto/PreludeEasy/PreludeEasy.so
373 %endif
374
375 %if %{with python}
376 %files -n python-libprelude
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{py_sitedir}/_prelude.so
379 %{py_sitedir}/prelude.py[co]
380 %{py_sitedir}/prelude-%{version}-py*.egg-info
381
382 %files -n python-PreludeEasy
383 %defattr(644,root,root,755)
384 %attr(755,root,root) %{py_sitedir}/_PreludeEasy.so
385 %{py_sitedir}/PreludeEasy.py[co]
386 %{py_sitedir}/PreludeEasy-%{version}-py*.egg-info
387 %endif
388
389 %if %{with ruby}
390 %files -n ruby-prelude
391 %defattr(644,root,root,755)
392 %attr(755,root,root) %{ruby_vendorarchdir}/PreludeEasy.so
393 %endif
This page took 0.15953 seconds and 2 git commands to generate.