]>
Commit | Line | Data |
---|---|---|
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 | 9 | Summary: The Prelude library |
6a1accbc | 10 | Summary(pl.UTF-8): Biblioteka Prelude |
f1347e6d | 11 | Name: libprelude |
30591219 SP |
12 | Version: 1.0.0 |
13 | Release: 1 | |
d0949742 | 14 | License: GPL v2 or commercial |
f1347e6d | 15 | Group: Libraries |
24d829c8 JB |
16 | #Source0Download: http://www.prelude-ids.com/developpement/telechargement/index.html |
17 | Source0: http://www.prelude-ids.com/download/releases/libprelude/%{name}-%{version}.tar.gz | |
30591219 SP |
18 | # Source0-md5: a5bb76538d240e5fac5f6ab0b7fabfe5 |
19 | Patch0: %{name}-libtool.patch | |
38968c27 | 20 | Patch1: %{name}-ruby.patch |
24d829c8 | 21 | URL: http://www.prelude-ids.com/ |
d0949742 JB |
22 | BuildRequires: autoconf >= 2.59 |
23 | BuildRequires: automake | |
f1347e6d AM |
24 | BuildRequires: bison |
25 | BuildRequires: flex | |
9320b06b | 26 | BuildRequires: gnutls-devel >= 1.0.17 |
d0949742 JB |
27 | BuildRequires: gtk-doc >= 1.0 |
28 | BuildRequires: libgcrypt-devel >= 1.1.94 | |
38968c27 JB |
29 | BuildRequires: libltdl-devel >= 2:2.0 |
30 | BuildRequires: libtool >= 2:2.0 | |
31 | %{?with_lua:BuildRequires: lua51-devel >= 5.1} | |
9320b06b | 32 | %{?with_perl:BuildRequires: perl-devel} |
d0949742 | 33 | %{?with_python:BuildRequires: python-devel >= 1:2.5} |
f1347e6d | 34 | BuildRequires: rpm-perlprov |
d0949742 JB |
35 | BuildRequires: rpm-pythonprov |
36 | BuildRequires: rpmbuild(macros) >= 1.219 | |
9bae6390 | 37 | %{?with_ruby:BuildRequires: ruby-devel >= 1.9} |
38968c27 | 38 | BuildRequires: sed >= 4.0 |
30591219 | 39 | %{?with_perl:BuildRequires: swig-perl} |
38968c27 JB |
40 | %{?with_python:BuildRequires: swig-python} |
41 | %{?with_ruby:BuildRequires: swig-ruby} | |
d0949742 | 42 | Requires: %{name}-libs = %{version}-%{release} |
f1347e6d AM |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
44 | ||
45 | %description | |
6c16cb84 | 46 | The Prelude library is a collection of generic functions providing |
f1347e6d AM |
47 | communication between the Prelude Hybrid IDS suite components. It |
48 | provides a convenient interface for sending alerts to Prelude Manager | |
49 | with transparent SSL, failover and replication support, asynchronous | |
50 | events and timer interfaces, an abstracted configuration API (hooking | |
51 | at the commandline, the configuration line, or wide configuration, | |
52 | available from the Manager), and a generic plugin API. It allows you | |
53 | to easily turn your favorite security program into a Prelude sensor. | |
54 | ||
5db7d1dc JR |
55 | %description -l pl.UTF-8 |
56 | Biblioteka Prelude to zbiór ogólnych funkcji zapewniających | |
57 | komunikację pomiędzy komponentami zestawu Prelude Hybrid IDS. | |
58 | Dostarcza wygodny interfejs do wysyłania alarmów do zarządcy Prelude z | |
59 | przezroczystą obsługę SSL, failover i replikacji, interfejsy do | |
60 | zdarzeń asynchronicznych i zegarów, abstrakcyjne API konfiguracyjne | |
81042991 | 61 | (obsługujące linię poleceń, linię konfiguracji i konfigurację dostępną |
62 | z zarządcy) oraz ogólne API wtyczek. Pozwala łatwo zamienić ulubiony | |
63 | program związany z bezpieczeństwem na czujnik Prelude. | |
7758741a | 64 | |
f1347e6d | 65 | %package libs |
6c16cb84 | 66 | Summary: The Prelude library |
6a1accbc | 67 | Summary(pl.UTF-8): Biblioteka Prelude |
7758741a | 68 | Group: Libraries |
d0949742 JB |
69 | Requires: gnutls >= 1.0.17 |
70 | Requires: libgcrypt >= 1.1.94 | |
f1347e6d AM |
71 | |
72 | %description libs | |
6c16cb84 | 73 | The Prelude library. |
f1347e6d | 74 | |
5db7d1dc | 75 | %description libs -l pl.UTF-8 |
7758741a JB |
76 | Biblioteka Prelude. |
77 | ||
f1347e6d | 78 | %package devel |
7758741a | 79 | Summary: Header files and development documentation for libprelude |
6a1accbc | 80 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programistyczna dla libprelude |
f1347e6d | 81 | Group: Development/Libraries |
7758741a | 82 | Requires: %{name}-libs = %{version}-%{release} |
d0949742 JB |
83 | Requires: gnutls-devel >= 1.0.17 |
84 | Requires: libgcrypt-devel >= 1.1.94 | |
85 | Requires: libltdl-devel | |
f1347e6d AM |
86 | |
87 | %description devel | |
7758741a JB |
88 | Header files and development documentation for libprelude. |
89 | ||
5db7d1dc JR |
90 | %description devel -l pl.UTF-8 |
91 | Pliki nagłówkowe i dokumentacja programistyczna dla libprelude. | |
f1347e6d AM |
92 | |
93 | %package static | |
94 | Summary: Static libprelude library | |
6a1accbc | 95 | Summary(pl.UTF-8): Statyczna biblioteka libprelude |
f1347e6d | 96 | Group: Development/Libraries |
7758741a | 97 | Requires: %{name}-devel = %{version}-%{release} |
f1347e6d AM |
98 | |
99 | %description static | |
100 | Static libprelude library. | |
101 | ||
5db7d1dc | 102 | %description static -l pl.UTF-8 |
7758741a JB |
103 | Statyczna biblioteka libprelude. |
104 | ||
38968c27 | 105 | %package -n lua-prelude |
9bae6390 JB |
106 | Summary: PreludeEasy - libprelude Lua bindings |
107 | Summary(pl.UTF-8): PreludeEasy - dowiązania języka Lua do libprelude | |
38968c27 JB |
108 | Group: Development/Languages |
109 | Requires: %{name} = %{version}-%{release} | |
110 | ||
111 | %description -n lua-prelude | |
9bae6390 | 112 | PreludeEasy - libprelude Lua bindings. |
38968c27 JB |
113 | |
114 | %description -n lua-prelude -l pl.UTF-8 | |
9bae6390 | 115 | PreludeEasy - dowiązania języka Lua do libprelude. |
38968c27 | 116 | |
f1347e6d | 117 | %package -n perl-libprelude |
7758741a | 118 | Summary: libprelude Perl bindings |
6a1accbc | 119 | Summary(pl.UTF-8): Dowiązania Perla do libprelude |
f1347e6d | 120 | Group: Development/Languages/Perl |
d0949742 | 121 | Requires: %{name}-libs = %{version}-%{release} |
f1347e6d AM |
122 | |
123 | %description -n perl-libprelude | |
7758741a JB |
124 | libprelude Perl bindings. |
125 | ||
5db7d1dc JR |
126 | %description -n perl-libprelude -l pl.UTF-8 |
127 | Dowiązania Perla dla libprelude. | |
f1347e6d AM |
128 | |
129 | %package -n python-libprelude | |
7758741a | 130 | Summary: libprelude Python bindings |
6a1accbc | 131 | Summary(pl.UTF-8): Dowiązania Pythona dla libprelude |
f1347e6d | 132 | Group: Development/Languages/Python |
d0949742 | 133 | Requires: %{name}-libs = %{version}-%{release} |
f1347e6d AM |
134 | |
135 | %description -n python-libprelude | |
7758741a JB |
136 | libprelude Python bindings. |
137 | ||
5db7d1dc JR |
138 | %description -n python-libprelude -l pl.UTF-8 |
139 | Dowiązania Pythona dla libprelude. | |
f1347e6d | 140 | |
9bae6390 JB |
141 | %package -n ruby-prelude |
142 | Summary: PreludeEasy - libprelude Ruby bindings | |
143 | Summary(pl.UTF-8): PreludeEasy - dowiązania języka Ruby do libprelude | |
144 | Group: Development/Languages | |
145 | Requires: %{name} = %{version}-%{release} | |
146 | ||
147 | %description -n ruby-prelude | |
148 | PreludeEasy - libprelude Ruby bindings. | |
149 | ||
150 | %description -n ruby-prelude -l pl.UTF-8 | |
151 | PreludeEasy - dowiązania języka Ruby do libprelude. | |
152 | ||
f1347e6d | 153 | %prep |
6de9ce54 | 154 | %setup -q |
30591219 | 155 | %patch0 -p1 |
38968c27 JB |
156 | |
157 | %if %{with python} | |
158 | # regenerate with fresh swig for gcc 4.6+ | |
159 | %{__rm} bindings/python/{_PreludeEasy.cxx,PreludeEasy.py} | |
160 | %endif | |
161 | %if %{with ruby} | |
162 | # same for ruby 1.9 | |
38968c27 | 163 | %{__rm} bindings/ruby/PreludeEasy.cxx |
9bae6390 | 164 | %patch1 -p1 |
38968c27 JB |
165 | %endif |
166 | ||
167 | sed -i -e 's/lua >= 5.1/lua51 >= 5.1/' configure.in | |
f1347e6d AM |
168 | |
169 | %build | |
d0949742 JB |
170 | %{__libtoolize} |
171 | %{__aclocal} -I m4 -I libmissing/m4 | |
172 | %{__autoconf} | |
173 | %{__autoheader} | |
174 | %{__automake} | |
f1347e6d | 175 | %configure \ |
f1347e6d | 176 | --enable-gtk-doc \ |
38968c27 JB |
177 | --enable-static \ |
178 | --with%{!?with_lua:out}-lua \ | |
f4f6dcd7 | 179 | --with%{!?with_perl:out}-perl \ |
180 | --with%{!?with_python:out}-python \ | |
d0949742 JB |
181 | --with-html-dir=%{_gtkdocdir}/libprelude \ |
182 | --with-perl-installdirs=vendor | |
6de9ce54 | 183 | |
f1347e6d AM |
184 | %{__make} |
185 | ||
186 | %install | |
187 | rm -rf $RPM_BUILD_ROOT | |
188 | ||
189 | %{__make} install \ | |
190 | DESTDIR=$RPM_BUILD_ROOT | |
191 | ||
9bae6390 JB |
192 | %if %{with lua} |
193 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/PreludeEasy.{la,a} | |
194 | %endif | |
9320b06b | 195 | %if %{with python} |
f1347e6d AM |
196 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
197 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
d0949742 | 198 | %py_postclean |
9320b06b | 199 | %endif |
9bae6390 JB |
200 | %if %{with ruby} |
201 | %{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/PreludeEasy.{la,a} | |
38968c27 | 202 | %endif |
f1347e6d AM |
203 | |
204 | %clean | |
205 | rm -rf $RPM_BUILD_ROOT | |
206 | ||
6c16cb84 | 207 | %post libs -p /sbin/ldconfig |
7758741a | 208 | %postun libs -p /sbin/ldconfig |
f1347e6d AM |
209 | |
210 | %files | |
211 | %defattr(644,root,root,755) | |
d0949742 JB |
212 | %doc AUTHORS ChangeLog LICENSE.README NEWS README |
213 | %attr(755,root,root) %{_bindir}/prelude-adduser | |
214 | %attr(755,root,root) %{_bindir}/prelude-admin | |
f1347e6d AM |
215 | %dir %{_sysconfdir}/prelude |
216 | %dir %{_sysconfdir}/prelude/default | |
38968c27 JB |
217 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/client.conf |
218 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/global.conf | |
219 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/idmef-client.conf | |
220 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/tls.conf | |
f1347e6d | 221 | %dir %{_sysconfdir}/prelude/profile |
d0949742 | 222 | %{_mandir}/man1/prelude-admin.1* |
f1347e6d AM |
223 | |
224 | %files libs | |
225 | %defattr(644,root,root,755) | |
d0949742 | 226 | %attr(755,root,root) %{_libdir}/libprelude.so.*.*.* |
30591219 | 227 | %attr(755,root,root) %{_libdir}/libpreludecpp.so.*.*.* |
d0949742 | 228 | %attr(755,root,root) %ghost %{_libdir}/libprelude.so.2 |
30591219 | 229 | %attr(755,root,root) %ghost %{_libdir}/libpreludecpp.so.0 |
f1347e6d AM |
230 | |
231 | %files devel | |
232 | %defattr(644,root,root,755) | |
233 | %attr(755,root,root) %{_bindir}/libprelude-config | |
d0949742 | 234 | %attr(755,root,root) %{_libdir}/libprelude.so |
30591219 | 235 | %attr(755,root,root) %{_libdir}/libpreludecpp.so |
d0949742 | 236 | %{_libdir}/libprelude.la |
30591219 | 237 | %{_libdir}/libpreludecpp.la |
f1347e6d | 238 | %{_includedir}/libprelude |
d0949742 | 239 | %{_aclocaldir}/libprelude.m4 |
f1347e6d | 240 | %{_gtkdocdir}/libprelude |
81042991 | 241 | %{_pkgconfigdir}/libprelude.pc |
f1347e6d AM |
242 | |
243 | %files static | |
244 | %defattr(644,root,root,755) | |
d0949742 | 245 | %{_libdir}/libprelude.a |
30591219 | 246 | %{_libdir}/libpreludecpp.a |
f1347e6d | 247 | |
38968c27 JB |
248 | %if %{with lua} |
249 | %files -n lua-prelude | |
250 | %defattr(644,root,root,755) | |
251 | %attr(755,root,root) %{_libdir}/PreludeEasy.so | |
252 | %endif | |
253 | ||
9320b06b | 254 | %if %{with perl} |
f1347e6d AM |
255 | %files -n perl-libprelude |
256 | %defattr(644,root,root,755) | |
f1347e6d | 257 | %{perl_vendorarch}/Prelude.pm |
d0949742 JB |
258 | %dir %{perl_vendorarch}/auto/Prelude |
259 | %{perl_vendorarch}/auto/Prelude/Prelude.bs | |
260 | %attr(755,root,root) %{perl_vendorarch}/auto/Prelude/Prelude.so | |
38968c27 JB |
261 | %dir %{perl_vendorarch}/auto/PreludeEasy |
262 | %{perl_vendorarch}/auto/PreludeEasy/PreludeEasy.bs | |
263 | %attr(755,root,root) %{perl_vendorarch}/auto/PreludeEasy/PreludeEasy.so | |
9320b06b | 264 | %endif |
f1347e6d | 265 | |
9320b06b | 266 | %if %{with python} |
f1347e6d AM |
267 | %files -n python-libprelude |
268 | %defattr(644,root,root,755) | |
d0949742 | 269 | %attr(755,root,root) %{py_sitedir}/_prelude.so |
30591219 | 270 | %attr(755,root,root) %{py_sitedir}/_PreludeEasy.so |
d0949742 | 271 | %{py_sitedir}/prelude.py[co] |
30591219 | 272 | %{py_sitedir}/PreludeEasy.py[co] |
d0949742 | 273 | %{py_sitedir}/prelude-*.egg-info |
30591219 | 274 | %{py_sitedir}/PreludeEasy-*.egg-info |
9320b06b | 275 | %endif |
9bae6390 JB |
276 | |
277 | %if %{with ruby} | |
278 | %files -n ruby-prelude | |
279 | %defattr(644,root,root,755) | |
280 | %attr(755,root,root) %{ruby_sitearchdir}/PreludeEasy.so | |
281 | %endif |