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