]> git.pld-linux.org Git - packages/libprelude.git/blob - libprelude.spec
- refresh PreludeEasy python binding from SWIG sources (needed for gcc 4.6+)
[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  python  # Python bindings (required by prewikka)
6 %bcond_with     ruby    # Ruby bindings (not ready for 1.9 yet)
7 #
8 %include        /usr/lib/rpm/macros.perl
9 Summary:        The Prelude library
10 Summary(pl.UTF-8):      Biblioteka Prelude
11 Name:           libprelude
12 Version:        1.0.0
13 Release:        1
14 License:        GPL v2 or commercial
15 Group:          Libraries
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
18 # Source0-md5:  a5bb76538d240e5fac5f6ab0b7fabfe5
19 Patch0:         %{name}-libtool.patch
20 Patch1:         %{name}-ruby.patch
21 URL:            http://www.prelude-ids.com/
22 BuildRequires:  autoconf >= 2.59
23 BuildRequires:  automake
24 BuildRequires:  bison
25 BuildRequires:  flex
26 BuildRequires:  gnutls-devel >= 1.0.17
27 BuildRequires:  gtk-doc >= 1.0
28 BuildRequires:  libgcrypt-devel >= 1.1.94
29 BuildRequires:  libltdl-devel >= 2:2.0
30 BuildRequires:  libtool >= 2:2.0
31 %{?with_lua:BuildRequires:      lua51-devel >= 5.1}
32 %{?with_perl:BuildRequires:     perl-devel}
33 %{?with_python:BuildRequires:   python-devel >= 1:2.5}
34 BuildRequires:  rpm-perlprov
35 BuildRequires:  rpm-pythonprov
36 BuildRequires:  rpmbuild(macros) >= 1.219
37 %{?with_ruby:BuildRequires:     ruby-devel >= 1.8, ruby-devel < 1.9}
38 BuildRequires:  sed >= 4.0
39 %{?with_perl:BuildRequires: swig-perl}
40 %{?with_python:BuildRequires: swig-python}
41 %{?with_ruby:BuildRequires: swig-ruby}
42 Requires:       %{name}-libs = %{version}-%{release}
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 The Prelude library is a collection of generic functions providing
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
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
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.
64
65 %package libs
66 Summary:        The Prelude library
67 Summary(pl.UTF-8):      Biblioteka Prelude
68 Group:          Libraries
69 Requires:       gnutls >= 1.0.17
70 Requires:       libgcrypt >= 1.1.94
71
72 %description libs
73 The Prelude library.
74
75 %description libs -l pl.UTF-8
76 Biblioteka Prelude.
77
78 %package devel
79 Summary:        Header files and development documentation for libprelude
80 Summary(pl.UTF-8):      Pliki nagłówkowe i dokumentacja programistyczna dla libprelude
81 Group:          Development/Libraries
82 Requires:       %{name}-libs = %{version}-%{release}
83 Requires:       gnutls-devel >= 1.0.17
84 Requires:       libgcrypt-devel >= 1.1.94
85 Requires:       libltdl-devel
86
87 %description devel
88 Header files and development documentation for libprelude.
89
90 %description devel -l pl.UTF-8
91 Pliki nagłówkowe i dokumentacja programistyczna dla libprelude.
92
93 %package static
94 Summary:        Static libprelude library
95 Summary(pl.UTF-8):      Statyczna biblioteka libprelude
96 Group:          Development/Libraries
97 Requires:       %{name}-devel = %{version}-%{release}
98
99 %description static
100 Static libprelude library.
101
102 %description static -l pl.UTF-8
103 Statyczna biblioteka libprelude.
104
105 %package -n lua-prelude
106 Summary:        libprelude Lua bindings
107 Summary(pl.UTF-8):      Dowiązania języka Lua do libprelude
108 Group:          Development/Languages
109 Requires:       %{name} = %{version}-%{release}
110
111 %description -n lua-prelude
112 libprelude Lua bindings.
113
114 %description -n lua-prelude -l pl.UTF-8
115 Dowiązania języka Lua do libprelude.
116
117 %package -n perl-libprelude
118 Summary:        libprelude Perl bindings
119 Summary(pl.UTF-8):      Dowiązania Perla do libprelude
120 Group:          Development/Languages/Perl
121 Requires:       %{name}-libs = %{version}-%{release}
122
123 %description -n perl-libprelude
124 libprelude Perl bindings.
125
126 %description -n perl-libprelude -l pl.UTF-8
127 Dowiązania Perla dla libprelude.
128
129 %package -n python-libprelude
130 Summary:        libprelude Python bindings
131 Summary(pl.UTF-8):      Dowiązania Pythona dla libprelude
132 Group:          Development/Languages/Python
133 Requires:       %{name}-libs = %{version}-%{release}
134
135 %description -n python-libprelude
136 libprelude Python bindings.
137
138 %description -n python-libprelude -l pl.UTF-8
139 Dowiązania Pythona dla libprelude.
140
141 %prep
142 %setup -q
143 %patch0 -p1
144 %{?with_ruby:%patch1 -p1}
145
146 %if %{with python}
147 # regenerate with fresh swig for gcc 4.6+
148 %{__rm} bindings/python/{_PreludeEasy.cxx,PreludeEasy.py}
149 %endif
150 %if %{with ruby}
151 # same for ruby 1.9
152 sed -i -e 's,"rubyio.h","ruby/io.h",' bindings/ruby/libpreludecpp-ruby.i
153 %{__rm} bindings/ruby/PreludeEasy.cxx
154 # TODO: more
155 %endif
156
157 sed -i -e 's/lua >= 5.1/lua51 >= 5.1/' configure.in
158
159 %build
160 %{__libtoolize}
161 %{__aclocal} -I m4 -I libmissing/m4
162 %{__autoconf}
163 %{__autoheader}
164 %{__automake}
165 %configure \
166         --enable-gtk-doc \
167         --enable-static \
168         --with%{!?with_lua:out}-lua \
169         --with%{!?with_perl:out}-perl \
170         --with%{!?with_python:out}-python \
171         --with-html-dir=%{_gtkdocdir}/libprelude \
172         --with-perl-installdirs=vendor
173
174 %{__make}
175
176 %install
177 rm -rf $RPM_BUILD_ROOT
178
179 %{__make} install \
180         DESTDIR=$RPM_BUILD_ROOT
181
182 %if %{with python}
183 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
184 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
185 %py_postclean
186 %endif
187 %if %{with lua}
188 %{__rm} $RPM_BUILD_ROOT%{_libdir}/PreludeEasy.{la,a}
189 %endif
190
191 %clean
192 rm -rf $RPM_BUILD_ROOT
193
194 %post   libs -p /sbin/ldconfig
195 %postun libs -p /sbin/ldconfig
196
197 %files
198 %defattr(644,root,root,755)
199 %doc AUTHORS ChangeLog LICENSE.README NEWS README
200 %attr(755,root,root) %{_bindir}/prelude-adduser
201 %attr(755,root,root) %{_bindir}/prelude-admin
202 %dir %{_sysconfdir}/prelude
203 %dir %{_sysconfdir}/prelude/default
204 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/client.conf
205 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/global.conf
206 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/idmef-client.conf
207 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelude/default/tls.conf
208 %dir %{_sysconfdir}/prelude/profile
209 %{_mandir}/man1/prelude-admin.1*
210
211 %files libs
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{_libdir}/libprelude.so.*.*.*
214 %attr(755,root,root) %{_libdir}/libpreludecpp.so.*.*.*
215 %attr(755,root,root) %ghost %{_libdir}/libprelude.so.2
216 %attr(755,root,root) %ghost %{_libdir}/libpreludecpp.so.0
217
218 %files devel
219 %defattr(644,root,root,755)
220 %attr(755,root,root) %{_bindir}/libprelude-config
221 %attr(755,root,root) %{_libdir}/libprelude.so
222 %attr(755,root,root) %{_libdir}/libpreludecpp.so
223 %{_libdir}/libprelude.la
224 %{_libdir}/libpreludecpp.la
225 %{_includedir}/libprelude
226 %{_aclocaldir}/libprelude.m4
227 %{_gtkdocdir}/libprelude
228 %{_pkgconfigdir}/libprelude.pc
229
230 %files static
231 %defattr(644,root,root,755)
232 %{_libdir}/libprelude.a
233 %{_libdir}/libpreludecpp.a
234
235 %if %{with lua}
236 %files -n lua-prelude
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_libdir}/PreludeEasy.so
239 %endif
240
241 %if %{with perl}
242 %files -n perl-libprelude
243 %defattr(644,root,root,755)
244 %{perl_vendorarch}/Prelude.pm
245 %dir %{perl_vendorarch}/auto/Prelude
246 %{perl_vendorarch}/auto/Prelude/Prelude.bs
247 %attr(755,root,root) %{perl_vendorarch}/auto/Prelude/Prelude.so
248 %dir %{perl_vendorarch}/auto/PreludeEasy
249 %{perl_vendorarch}/auto/PreludeEasy/PreludeEasy.bs
250 %attr(755,root,root) %{perl_vendorarch}/auto/PreludeEasy/PreludeEasy.so
251 %endif
252
253 %if %{with python}
254 %files -n python-libprelude
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{py_sitedir}/_prelude.so
257 %attr(755,root,root) %{py_sitedir}/_PreludeEasy.so
258 %{py_sitedir}/prelude.py[co]
259 %{py_sitedir}/PreludeEasy.py[co]
260 %{py_sitedir}/prelude-*.egg-info
261 %{py_sitedir}/PreludeEasy-*.egg-info
262 %endif
This page took 0.074624 seconds and 4 git commands to generate.