3 %bcond_without tests # build without tests
5 %include /usr/lib/rpm/macros.perl
6 Summary: The flowd NetFlow collector daemon
7 Summary(pl.UTF-8): flowd - demon zbierania danych NetFlow
12 Group: Applications/Networking
13 Source0: http://www.mindrot.org/files/flowd/%{name}-%{version}.tar.gz
14 # Source0-md5: a3d0512b5e6d9c7d9e749d9894376ea4
15 Patch0: %{name}-username.patch
16 Patch1: format-error.patch
17 URL: http://www.mindrot.org/flowd.html
19 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: python-devel
21 BuildRequires: python-modules
22 BuildRequires: rpm-perlprov >= 4.1-13
23 BuildRequires: rpm-pythonprov
24 BuildRequires: rpmbuild(macros) >= 1.268
25 Requires(post,preun): /sbin/chkconfig
26 Requires(postun): /usr/sbin/groupdel
27 Requires(postun): /usr/sbin/userdel
28 Requires(pre): /bin/id
29 Requires(pre): /usr/bin/getgid
30 Requires(pre): /usr/sbin/groupadd
31 Requires(pre): /usr/sbin/useradd
33 Provides: group(flowd)
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 This is flowd, a NetFlow collector daemon intended to be small, fast
41 It features some basic filtering to limit or tag the flows that are
42 recorded and is privilege separated, to limit security exposure from
45 %description -l pl.UTF-8
46 Ten pakiet zawiera program flowd - demona zbierającego dane NetFlow,
47 mającego być małym, szybkim i bezpiecznym.
49 Obsługuje podstawowe filtrowanie w celu ograniczania lub znakowania
50 zapisywanych przepływów, ma rozdzielenie uprawnień w celu ograniczenia
51 wpływu własnych błedów na bezpieczeństwo.
53 %package -n perl-Flowd
54 Summary: Perl API to access flowd logfiles
55 Summary(pl.UTF-8): Perlowe API do dostępu do plików logów flowd
56 Group: Development/Languages/Perl
59 %description -n perl-Flowd
60 This is a Perl API to the binary flowd network flow log format and an
61 example reader application.
63 %description -n perl-Flowd -l pl.UTF-8
64 Ten pakiet zawiera API Perla dla binarnego formatu plików logów
65 przepływów sieciowych flowd oraz przykładowy program czytający.
67 %package -n python-flowd
68 Summary: Python API to access flowd logfiles
69 Summary(pl.UTF-8): Pythonowe API do dostępu do plików logów flowd
70 Group: Applications/Networking
71 Obsoletes: flowd-python
73 %description -n python-flowd
74 This is a Python API to the binary flowd network flow log format and
75 an example reader application.
77 %description -n python-flowd -l pl.UTF-8
78 Ten pakiet zawiera API Pythona dla binarnego formatu plików logów
79 przepływów sieciowych flowd oraz przykładowy program czytający.
82 Summary: Collection of example flowd tools
83 Summary(pl.UTF-8): Zbiór przykładowych narzędzi dla flowd
84 Group: Applications/Networking
87 A collection of tools for use with flowd.
89 %description tools -l pl.UTF-8
90 Zbiór narzędzi do używania z flowd.
93 Summary: C API to access flowd logfiles
94 Summary(pl.UTF-8): API C do dostępu do plików logów flowd
95 Group: Development/Libraries
98 This is a C API to the binary flowd network flow log format.
100 %description devel -l pl.UTF-8
101 Ten pakiet zawiera API C dla binarnego formatu plików logów przepływów
113 CFLAGS="%{rpmcflags}" \
114 %{__python} setup.py build
117 %{__perl} Makefile.PL \
120 %{?with_tests:%{__make} test}
123 rm -rf $RPM_BUILD_ROOT
126 DESTDIR=$RPM_BUILD_ROOT
129 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
130 install -p flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd
133 %{__make} -C Flowd-perl pure_install \
134 DESTDIR=$RPM_BUILD_ROOT
136 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Flowd/.packlist
139 %{__python} setup.py install \
141 --root=$RPM_BUILD_ROOT
144 rm -rf $RPM_BUILD_ROOT
147 %groupadd -g 198 flowd
148 %useradd -u 198 -d /usr/share/empty -s /bin/false -c "flowd user" -g flowd flowd
151 /sbin/chkconfig --add flowd
152 %service flowd restart "flowd daemon"
155 if [ "$1" = "0" ]; then
157 /sbin/chkconfig --del flowd
161 if [ "$1" = "0" ]; then
167 %defattr(644,root,root,755)
168 %doc ChangeLog LICENSE README TODO
169 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flowd.conf
170 %attr(754,root,root) /etc/rc.d/init.d/flowd
171 %attr(755,root,root) %{_bindir}/flowd-reader
172 %attr(755,root,root) %{_sbindir}/flowd
173 %{_mandir}/man5/flowd.conf.5*
174 %{_mandir}/man8/flowd.8*
175 %{_mandir}/man8/flowd-reader.8*
178 %defattr(644,root,root,755)
180 %{perl_vendorarch}/Flowd.pm
181 %dir %{perl_vendorarch}/auto/Flowd
182 %{perl_vendorarch}/auto/Flowd/Flowd.bs
183 %attr(755,root,root) %{perl_vendorarch}/auto/Flowd/Flowd.so
184 %{_mandir}/man3/Flowd.3pm*
186 %files -n python-flowd
187 %defattr(644,root,root,755)
189 %attr(755,root,root) %{py_sitedir}/flowd.so
190 %if "%{py_ver}" > "2.4"
191 %{py_sitedir}/flowd-*.egg-info
195 %defattr(644,root,root,755)
199 %defattr(644,root,root,755)
201 %{_libdir}/libflowd.a