]> git.pld-linux.org Git - packages/libprelude.git/blob - libprelude.spec
- updated to 1.0.1
[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:        1
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 BuildRequires:  trousers-devel
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
234 %patch2 -p1
235 %patch3 -p1
236 %patch4 -p1
237
238 sed -i -e 's/lua >= 5.1/lua51 >= 5.1/' configure.in
239
240 %build
241 %{__libtoolize}
242 %{__aclocal} -I m4 -I libmissing/m4
243 %{__autoconf}
244 %{__autoheader}
245 %{__automake}
246 %configure \
247         --enable-gtk-doc \
248         --enable-static \
249         --with%{!?with_lua:out}-lua \
250         --with%{!?with_perl:out}-perl \
251         --with%{!?with_python:out}-python \
252         --with-html-dir=%{_gtkdocdir}/libprelude \
253         --with-perl-installdirs=vendor
254
255 %{__make}
256
257 %install
258 rm -rf $RPM_BUILD_ROOT
259
260 %{__make} install \
261         DESTDIR=$RPM_BUILD_ROOT
262
263 %if %{with perl}
264 # missing from make install
265 [ ! -f $RPM_BUILD_ROOT%{perl_vendorarch}/PreludeEasy.pm ] || exit 1
266 cp -p bindings/perl/PreludeEasy.pm $RPM_BUILD_ROOT%{perl_vendorarch}
267 %endif
268 %if %{with lua}
269 %{__rm} $RPM_BUILD_ROOT%{_libdir}/PreludeEasy.{la,a}
270 %endif
271 %if %{with python}
272 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
273 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
274 %py_postclean
275 %endif
276 %if %{with ruby}
277 %{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/PreludeEasy.{la,a}
278 %endif
279
280 %clean
281 rm -rf $RPM_BUILD_ROOT
282
283 %post   libs -p /sbin/ldconfig
284 %postun libs -p /sbin/ldconfig
285
286 %post   c++ -p /sbin/ldconfig
287 %postun c++ -p /sbin/ldconfig
288
289 %files
290 %defattr(644,root,root,755)
291 %doc AUTHORS ChangeLog LICENSE.README NEWS README
292 %attr(755,root,root) %{_bindir}/prelude-adduser
293 %attr(755,root,root) %{_bindir}/prelude-admin
294 %dir %{_sysconfdir}/prelude
295 %dir %{_sysconfdir}/prelude/default
296 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/client.conf
297 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/global.conf
298 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/idmef-client.conf
299 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/tls.conf
300 %dir %{_sysconfdir}/prelude/profile
301 %{_mandir}/man1/prelude-admin.1*
302
303 %files libs
304 %defattr(644,root,root,755)
305 %attr(755,root,root) %{_libdir}/libprelude.so.*.*.*
306 %attr(755,root,root) %ghost %{_libdir}/libprelude.so.2
307
308 %files devel
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_bindir}/libprelude-config
311 %attr(755,root,root) %{_libdir}/libprelude.so
312 %{_libdir}/libprelude.la
313 %dir %{_includedir}/libprelude
314 %{_includedir}/libprelude/*.h
315 %{_aclocaldir}/libprelude.m4
316 %{_gtkdocdir}/libprelude
317 %{_pkgconfigdir}/libprelude.pc
318
319 %files static
320 %defattr(644,root,root,755)
321 %{_libdir}/libprelude.a
322
323 %files c++
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_libdir}/libpreludecpp.so.*.*.*
326 %attr(755,root,root) %ghost %{_libdir}/libpreludecpp.so.0
327
328 %files c++-devel
329 %defattr(644,root,root,755)
330 %attr(755,root,root) %{_libdir}/libpreludecpp.so
331 %{_libdir}/libpreludecpp.la
332 %{_includedir}/libprelude/idmef*.hxx
333 %{_includedir}/libprelude/prelude*.hxx
334
335 %files c++-static
336 %defattr(644,root,root,755)
337 %{_libdir}/libpreludecpp.a
338
339 %if %{with lua}
340 %files -n lua-prelude
341 %defattr(644,root,root,755)
342 %attr(755,root,root) %{_libdir}/PreludeEasy.so
343 %endif
344
345 %if %{with perl}
346 %files -n perl-libprelude
347 %defattr(644,root,root,755)
348 %{perl_vendorarch}/Prelude.pm
349 %dir %{perl_vendorarch}/auto/Prelude
350 %{perl_vendorarch}/auto/Prelude/Prelude.bs
351 %attr(755,root,root) %{perl_vendorarch}/auto/Prelude/Prelude.so
352
353 %files -n perl-PreludeEasy
354 %defattr(644,root,root,755)
355 %{perl_vendorarch}/PreludeEasy.pm
356 %dir %{perl_vendorarch}/auto/PreludeEasy
357 %{perl_vendorarch}/auto/PreludeEasy/PreludeEasy.bs
358 %attr(755,root,root) %{perl_vendorarch}/auto/PreludeEasy/PreludeEasy.so
359 %endif
360
361 %if %{with python}
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
368 %files -n python-PreludeEasy
369 %defattr(644,root,root,755)
370 %attr(755,root,root) %{py_sitedir}/_PreludeEasy.so
371 %{py_sitedir}/PreludeEasy.py[co]
372 %{py_sitedir}/PreludeEasy-%{version}-py*.egg-info
373 %endif
374
375 %if %{with ruby}
376 %files -n ruby-prelude
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{ruby_sitearchdir}/PreludeEasy.so
379 %endif
This page took 0.087935 seconds and 4 git commands to generate.