]> git.pld-linux.org Git - packages/libprelude.git/blame - libprelude.spec
Release 12 (by relup.sh)
[packages/libprelude.git] / libprelude.spec
CommitLineData
26c3f184 1#
2# Conditional build:
25f258d7
JB
3%bcond_without lua # Lua (5.1) bindings
4%bcond_without perl # Perl bindings
5%bcond_without python2 # Python 2.x bindings (required by prewikka)
6%bcond_without python3 # Python 3.x bindings
7%bcond_without ruby # Ruby bindings
8%bcond_without static_libs # static libraries
26c3f184 9#
e4dc5952
JB
10# 5.1 also possible, 5.2 is preferred
11%define lua_ver 5.2
12%define lua_pkg lua%(echo %{lua_ver} | tr -d .)
6c16cb84 13Summary: The Prelude library
6a1accbc 14Summary(pl.UTF-8): Biblioteka Prelude
f1347e6d 15Name: libprelude
1249acaf 16Version: 5.1.1
83e14e33 17Release: 12
d0949742 18License: GPL v2 or commercial
f1347e6d 19Group: Libraries
b280342e 20#Source0Download: https://www.prelude-siem.org/projects/prelude/files
1249acaf
JR
21Source0: https://www.prelude-siem.org/attachments/download/1181/%{name}-%{version}.tar.gz
22# Source0-md5: 9302c68e1c84a847f77574ab048177e6
25f258d7 23Patch0: python-install.patch
e4dc5952 24Patch1: %{name}-lua.patch
1249acaf 25Patch2: gtk-doc-1.32.patch
9653f407 26Patch3: python-3.8-fix.patch
b280342e 27URL: https://www.prelude-siem.org/
d0949742 28BuildRequires: autoconf >= 2.59
ecc3e790 29BuildRequires: automake >= 1:1.9
f1347e6d
AM
30BuildRequires: bison
31BuildRequires: flex
4221551e 32BuildRequires: gnulib >= 0-0.20181013.2
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 38BuildRequires: libtool >= 2:2.0
ef91ddc6 39%{?with_lua:BuildRequires: %{lua_pkg} >= %{lua_ver}}
e4dc5952 40%{?with_lua:BuildRequires: %{lua_pkg}-devel >= %{lua_ver}}
9320b06b 41%{?with_perl:BuildRequires: perl-devel}
25f258d7
JB
42%{?with_python2:BuildRequires: python-devel >= 1:2.5}
43%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
f1347e6d 44BuildRequires: rpm-perlprov
d0949742 45BuildRequires: rpm-pythonprov
231344c5 46BuildRequires: rpmbuild(macros) >= 1.745
9bae6390 47%{?with_ruby:BuildRequires: ruby-devel >= 1.9}
38968c27 48BuildRequires: sed >= 4.0
30591219 49%{?with_perl:BuildRequires: swig-perl}
38968c27
JB
50%{?with_python:BuildRequires: swig-python}
51%{?with_ruby:BuildRequires: swig-ruby}
d0949742 52Requires: %{name}-libs = %{version}-%{release}
f1347e6d
AM
53BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55%description
6c16cb84 56The Prelude library is a collection of generic functions providing
f1347e6d
AM
57communication between the Prelude Hybrid IDS suite components. It
58provides a convenient interface for sending alerts to Prelude Manager
59with transparent SSL, failover and replication support, asynchronous
60events and timer interfaces, an abstracted configuration API (hooking
61at the commandline, the configuration line, or wide configuration,
62available from the Manager), and a generic plugin API. It allows you
63to easily turn your favorite security program into a Prelude sensor.
64
5db7d1dc
JR
65%description -l pl.UTF-8
66Biblioteka Prelude to zbiór ogólnych funkcji zapewniających
67komunikację pomiędzy komponentami zestawu Prelude Hybrid IDS.
68Dostarcza wygodny interfejs do wysyłania alarmów do zarządcy Prelude z
69przezroczystą obsługę SSL, failover i replikacji, interfejsy do
70zdarzeń asynchronicznych i zegarów, abstrakcyjne API konfiguracyjne
81042991 71(obsługujące linię poleceń, linię konfiguracji i konfigurację dostępną
72z zarządcy) oraz ogólne API wtyczek. Pozwala łatwo zamienić ulubiony
73program związany z bezpieczeństwem na czujnik Prelude.
7758741a 74
f1347e6d 75%package libs
6c16cb84 76Summary: The Prelude library
6a1accbc 77Summary(pl.UTF-8): Biblioteka Prelude
7758741a 78Group: Libraries
d0949742
JB
79Requires: gnutls >= 1.0.17
80Requires: libgcrypt >= 1.1.94
f1347e6d
AM
81
82%description libs
6c16cb84 83The Prelude library.
f1347e6d 84
5db7d1dc 85%description libs -l pl.UTF-8
7758741a
JB
86Biblioteka Prelude.
87
f1347e6d 88%package devel
7758741a 89Summary: Header files and development documentation for libprelude
6a1accbc 90Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programistyczna dla libprelude
f1347e6d 91Group: Development/Libraries
7758741a 92Requires: %{name}-libs = %{version}-%{release}
d0949742
JB
93Requires: gnutls-devel >= 1.0.17
94Requires: libgcrypt-devel >= 1.1.94
95Requires: libltdl-devel
f1347e6d
AM
96
97%description devel
7758741a
JB
98Header files and development documentation for libprelude.
99
5db7d1dc
JR
100%description devel -l pl.UTF-8
101Pliki nagłówkowe i dokumentacja programistyczna dla libprelude.
f1347e6d
AM
102
103%package static
104Summary: Static libprelude library
6a1accbc 105Summary(pl.UTF-8): Statyczna biblioteka libprelude
f1347e6d 106Group: Development/Libraries
7758741a 107Requires: %{name}-devel = %{version}-%{release}
f1347e6d
AM
108
109%description static
110Static libprelude library.
111
5db7d1dc 112%description static -l pl.UTF-8
7758741a
JB
113Statyczna biblioteka libprelude.
114
eb068d3a
JB
115%package c++
116Summary: libpreludecpp - C++ binding for libprelude
117Summary(pl.UTF-8): libpreludecpp - wiązanie C++ do libprelude
118Group: Libraries
119Requires: %{name}-libs = %{version}-%{release}
120
121%description c++
122libpreludecpp - C++ binding for libprelude.
123
124%description c++ -l pl.UTF-8
125libpreludecpp - wiązanie C++ do libprelude.
126
127%package c++-devel
128Summary: Header file for libpreludecpp library
129Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libpreludecpp
130Group: Development/Libraries
131Requires: %{name}-c++ = %{version}-%{release}
132Requires: %{name}-devel = %{version}-%{release}
133Requires: libstdc++-devel
134
135%description c++-devel
136Header file for libpreludecpp library - C++ binding for libprelude.
137
138%description c++-devel -l pl.UTF-8
139Pliki nagłówkowe biblioteki libpreludecpp - wiązań C++ do libprelude.
140
141%package c++-static
142Summary: Static libpreludecpp library
143Summary(pl.UTF-8): Statyczna biblioteka libpreludecpp
144Group: Development/Libraries
145Requires: %{name}-c++-devel = %{version}-%{release}
146
147%description c++-static
148Static libpreludecpp library.
149
150%description c++-static -l pl.UTF-8
151Statyczna biblioteka libpreludecpp.
152
d46de3b3
JB
153%package swig
154Summary: SWIG development files for libprelude
155Summary(pl.UTF-8): Pliki programistyczne SWIG-a dla libprelude
156Group: Development/Libraries
157Requires: %{name}-c++-devel = %{version}-%{release}
158Requires: swig
159
160%description swig
161SWIG development files for libprelude.
162
163%description swig -l pl.UTF-8
164Pliki programistyczne SWIG-a dla libprelude.
165
38968c27 166%package -n lua-prelude
9bae6390
JB
167Summary: PreludeEasy - libprelude Lua bindings
168Summary(pl.UTF-8): PreludeEasy - dowiązania języka Lua do libprelude
38968c27 169Group: Development/Languages
eb068d3a 170Requires: %{name}-c++ = %{version}-%{release}
e4dc5952 171Requires: %{lua_pkg} >= %{lua_ver}
38968c27
JB
172
173%description -n lua-prelude
9bae6390 174PreludeEasy - libprelude Lua bindings.
38968c27
JB
175
176%description -n lua-prelude -l pl.UTF-8
9bae6390 177PreludeEasy - dowiązania języka Lua do libprelude.
38968c27 178
f1347e6d 179%package -n perl-libprelude
d46de3b3
JB
180Summary: Prelude Perl module - Perl binding for libprelude
181Summary(pl.UTF-8): Moduł Perla Prelude - wiązanie Perla do libprelude
f1347e6d 182Group: Development/Languages/Perl
d46de3b3 183Requires: %{name}-c++ = %{version}-%{release}
25f258d7 184Obsoletes: perl-PreludeEasy
f1347e6d
AM
185
186%description -n perl-libprelude
d46de3b3 187Prelude Perl module - Perl binding for libprelude.
7758741a 188
5db7d1dc 189%description -n perl-libprelude -l pl.UTF-8
d46de3b3 190Moduł Perla Prelude - wiązanie Perla do libprelude.
eb068d3a 191
f1347e6d 192%package -n python-libprelude
d46de3b3
JB
193Summary: Python 2.x binding for libprelude
194Summary(pl.UTF-8): Wiązanie Pythona 2.x do libprelude
f1347e6d 195Group: Development/Languages/Python
d46de3b3 196Requires: %{name}-c++ = %{version}-%{release}
25f258d7 197Obsoletes: python-PreludeEasy
f1347e6d
AM
198
199%description -n python-libprelude
d46de3b3 200Python 2.x binding for libprelude.
7758741a 201
5db7d1dc 202%description -n python-libprelude -l pl.UTF-8
d46de3b3 203Wiązanie Pythona 2.x do libprelude.
eb068d3a 204
25f258d7 205%package -n python3-libprelude
d46de3b3
JB
206Summary: Python 3.x binding for libprelude
207Summary(pl.UTF-8): Wiązanie Pythona 3.x do libprelude
eb068d3a 208Group: Development/Languages/Python
d46de3b3 209Requires: %{name}-c++ = %{version}-%{release}
eb068d3a 210
25f258d7 211%description -n python3-libprelude
d46de3b3 212Python 3.x binding for libprelude.
eb068d3a 213
25f258d7 214%description -n python3-libprelude -l pl.UTF-8
d46de3b3 215Wiązanie Pythona 3.x do libprelude.
f1347e6d 216
9bae6390 217%package -n ruby-prelude
d46de3b3
JB
218Summary: Ruby bindings for libprelude
219Summary(pl.UTF-8): Wiązania języka Ruby do libprelude
9bae6390 220Group: Development/Languages
eb068d3a 221Requires: %{name}-c++ = %{version}-%{release}
9bae6390
JB
222
223%description -n ruby-prelude
d46de3b3 224Ruby bindings for libprelude.
9bae6390
JB
225
226%description -n ruby-prelude -l pl.UTF-8
d46de3b3 227Wiązania języka Ruby do libprelude.
9bae6390 228
f1347e6d 229%prep
6de9ce54 230%setup -q
30591219 231%patch0 -p1
e4dc5952 232%patch1 -p1
1249acaf 233%patch2 -p1
9653f407 234%patch3 -p1
38968c27 235
25f258d7
JB
236%if %{with python3}
237# regenerate with fresh swig for python 3.5+
238%{__rm} bindings/python/{_prelude.cxx,prelude.py}
38968c27 239%endif
4ddd3a0d 240
f1347e6d 241%build
4221551e
AG
242gnulib-tool --copy-file lib/fseeko.c libmissing/fseeko.c
243gnulib-tool --copy-file m4/fseeko.m4 libmissing/m4/fseeko.m4
7a77ea6c 244%{__gtkdocize}
d0949742
JB
245%{__libtoolize}
246%{__aclocal} -I m4 -I libmissing/m4
247%{__autoconf}
248%{__autoheader}
249%{__automake}
f1347e6d 250%configure \
62e43182 251 am_cv_ruby_rbexecdir=%{ruby_vendorarchdir} \
f1347e6d 252 --enable-gtk-doc \
25f258d7 253 %{?with_static_libs:--enable-static} \
d0949742 254 --with-html-dir=%{_gtkdocdir}/libprelude \
25f258d7
JB
255 --with-lua%{!?with_lua:=no} \
256 --with-perl%{!?with_perl:=no} \
257 --with-perl-installdirs=vendor \
76646abe 258 --with-python2%{!?with_python2:=no} \
25f258d7
JB
259 --with-python3%{!?with_python3:=no} \
260 --with-swig
6de9ce54 261
f1347e6d
AM
262%{__make}
263
264%install
265rm -rf $RPM_BUILD_ROOT
266
267%{__make} install \
25f258d7
JB
268 DESTDIR=$RPM_BUILD_ROOT \
269 pythondir=%{py_sitescriptdir} \
270 pyexecdir=%{py_sitedir} \
271 python3dir=%{py3_sitescriptdir} \
272 py3execdir=%{py3_sitedir}
f1347e6d 273
9bae6390 274%if %{with lua}
e4dc5952
JB
275%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/%{lua_ver}/prelude.la \
276 %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/lua/%{lua_ver}/prelude.a}
9bae6390 277%endif
25f258d7 278%if %{with python2}
d0949742 279%py_postclean
9320b06b 280%endif
9bae6390 281%if %{with ruby}
25f258d7
JB
282%{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/Prelude.la \
283 %{?with_static_libs:$RPM_BUILD_ROOT%{ruby_vendorarchdir}/Prelude.a}
38968c27 284%endif
f1347e6d
AM
285
286%clean
287rm -rf $RPM_BUILD_ROOT
288
6c16cb84 289%post libs -p /sbin/ldconfig
7758741a 290%postun libs -p /sbin/ldconfig
f1347e6d 291
eb068d3a
JB
292%post c++ -p /sbin/ldconfig
293%postun c++ -p /sbin/ldconfig
294
f1347e6d
AM
295%files
296%defattr(644,root,root,755)
d0949742
JB
297%doc AUTHORS ChangeLog LICENSE.README NEWS README
298%attr(755,root,root) %{_bindir}/prelude-adduser
299%attr(755,root,root) %{_bindir}/prelude-admin
f1347e6d
AM
300%dir %{_sysconfdir}/prelude
301%dir %{_sysconfdir}/prelude/default
38968c27
JB
302%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/client.conf
303%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/global.conf
304%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/idmef-client.conf
305%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/tls.conf
f1347e6d 306%dir %{_sysconfdir}/prelude/profile
d0949742 307%{_mandir}/man1/prelude-admin.1*
f1347e6d
AM
308
309%files libs
310%defattr(644,root,root,755)
d0949742 311%attr(755,root,root) %{_libdir}/libprelude.so.*.*.*
1249acaf 312%attr(755,root,root) %ghost %{_libdir}/libprelude.so.28
f1347e6d
AM
313
314%files devel
315%defattr(644,root,root,755)
316%attr(755,root,root) %{_bindir}/libprelude-config
d0949742
JB
317%attr(755,root,root) %{_libdir}/libprelude.so
318%{_libdir}/libprelude.la
eb068d3a
JB
319%dir %{_includedir}/libprelude
320%{_includedir}/libprelude/*.h
d0949742 321%{_aclocaldir}/libprelude.m4
f1347e6d 322%{_gtkdocdir}/libprelude
81042991 323%{_pkgconfigdir}/libprelude.pc
e4dc5952 324%{_mandir}/man1/libprelude-config.1*
f1347e6d 325
25f258d7 326%if %{with static_libs}
f1347e6d
AM
327%files static
328%defattr(644,root,root,755)
d0949742 329%{_libdir}/libprelude.a
25f258d7 330%endif
eb068d3a
JB
331
332%files c++
333%defattr(644,root,root,755)
334%attr(755,root,root) %{_libdir}/libpreludecpp.so.*.*.*
1249acaf 335%attr(755,root,root) %ghost %{_libdir}/libpreludecpp.so.12
eb068d3a
JB
336
337%files c++-devel
338%defattr(644,root,root,755)
339%attr(755,root,root) %{_libdir}/libpreludecpp.so
340%{_libdir}/libpreludecpp.la
341%{_includedir}/libprelude/idmef*.hxx
342%{_includedir}/libprelude/prelude*.hxx
343
25f258d7 344%if %{with static_libs}
eb068d3a
JB
345%files c++-static
346%defattr(644,root,root,755)
30591219 347%{_libdir}/libpreludecpp.a
25f258d7 348%endif
f1347e6d 349
d46de3b3
JB
350%files swig
351%defattr(644,root,root,755)
352%dir %{_datadir}/libprelude
353%{_datadir}/libprelude/swig
354
38968c27
JB
355%if %{with lua}
356%files -n lua-prelude
357%defattr(644,root,root,755)
e4dc5952 358%attr(755,root,root) %{_libdir}/lua/%{lua_ver}/prelude.so
38968c27
JB
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
9320b06b 367%endif
f1347e6d 368
25f258d7 369%if %{with python2}
f1347e6d
AM
370%files -n python-libprelude
371%defattr(644,root,root,755)
d0949742
JB
372%attr(755,root,root) %{py_sitedir}/_prelude.so
373%{py_sitedir}/prelude.py[co]
eb068d3a 374%{py_sitedir}/prelude-%{version}-py*.egg-info
25f258d7 375%endif
eb068d3a 376
25f258d7
JB
377%if %{with python3}
378%files -n python3-libprelude
eb068d3a 379%defattr(644,root,root,755)
25f258d7
JB
380%attr(755,root,root) %{py3_sitedir}/_prelude.cpython-*.so
381%{py3_sitedir}/prelude.py
382%{py3_sitedir}/__pycache__/prelude.cpython-*.py[co]
383%{py3_sitedir}/prelude-%{version}-py*.egg-info
9320b06b 384%endif
9bae6390
JB
385
386%if %{with ruby}
387%files -n ruby-prelude
388%defattr(644,root,root,755)
25f258d7 389%attr(755,root,root) %{ruby_vendorarchdir}/Prelude.so
9bae6390 390%endif
This page took 0.22115 seconds and 4 git commands to generate.