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