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