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