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