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 URL: http://www.mindrot.org/flowd.html
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: python-devel
20 BuildRequires: python-modules
21 BuildRequires: rpm-perlprov >= 4.1-13
22 BuildRequires: rpm-pythonprov
23 BuildRequires: rpmbuild(macros) >= 1.268
24 Requires(post,preun): /sbin/chkconfig
25 Requires(postun): /usr/sbin/groupdel
26 Requires(postun): /usr/sbin/userdel
27 Requires(pre): /bin/id
28 Requires(pre): /usr/bin/getgid
29 Requires(pre): /usr/sbin/groupadd
30 Requires(pre): /usr/sbin/useradd
32 Provides: group(flowd)
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 This is flowd, a NetFlow collector daemon intended to be small, fast
40 It features some basic filtering to limit or tag the flows that are
41 recorded and is privilege separated, to limit security exposure from
44 %description -l pl.UTF-8
45 Ten pakiet zawiera program flowd - demona zbierającego dane NetFlow,
46 mającego być małym, szybkim i bezpiecznym.
48 Obsługuje podstawowe filtrowanie w celu ograniczania lub znakowania
49 zapisywanych przepływów, ma rozdzielenie uprawnień w celu ograniczenia
50 wpływu własnych błedów na bezpieczeństwo.
52 %package -n perl-Flowd
53 Summary: Perl API to access flowd logfiles
54 Summary(pl.UTF-8): Perlowe API do dostępu do plików logów flowd
55 Group: Development/Languages/Perl
58 %description -n perl-Flowd
59 This is a Perl API to the binary flowd network flow log format and an
60 example reader application.
62 %description -n perl-Flowd -l pl.UTF-8
63 Ten pakiet zawiera API Perla dla binarnego formatu plików logów
64 przepływów sieciowych flowd oraz przykładowy program czytający.
66 %package -n python-flowd
67 Summary: Python API to access flowd logfiles
68 Summary(pl.UTF-8): Pythonowe API do dostępu do plików logów flowd
69 Group: Applications/Networking
70 Obsoletes: flowd-python
72 %description -n python-flowd
73 This is a Python API to the binary flowd network flow log format and
74 an example reader application.
76 %description -n python-flowd -l pl.UTF-8
77 Ten pakiet zawiera API Pythona dla binarnego formatu plików logów
78 przepływów sieciowych flowd oraz przykładowy program czytający.
81 Summary: Collection of example flowd tools
82 Summary(pl.UTF-8): Zbiór przykładowych narzędzi dla flowd
83 Group: Applications/Networking
86 A collection of tools for use with flowd.
88 %description tools -l pl.UTF-8
89 Zbiór narzędzi do używania z flowd.
92 Summary: C API to access flowd logfiles
93 Summary(pl.UTF-8): API C do dostępu do plików logów flowd
94 Group: Development/Libraries
97 This is a C API to the binary flowd network flow log format.
99 %description devel -l pl.UTF-8
100 Ten pakiet zawiera API C dla binarnego formatu plików logów przepływów
111 CFLAGS="%{rpmcflags}" \
112 %{__python} setup.py build
115 %{__perl} Makefile.PL \
118 %{?with_tests:%{__make} test}
121 rm -rf $RPM_BUILD_ROOT
124 DESTDIR=$RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
128 install -p flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd
131 %{__make} -C Flowd-perl pure_install \
132 DESTDIR=$RPM_BUILD_ROOT
134 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Flowd/.packlist
137 %{__python} setup.py install \
139 --root=$RPM_BUILD_ROOT
142 rm -rf $RPM_BUILD_ROOT
145 %groupadd -g 198 flowd
146 %useradd -u 198 -d /usr/share/empty -s /bin/false -c "flowd user" -g flowd flowd
149 /sbin/chkconfig --add flowd
150 %service flowd restart "flowd daemon"
153 if [ "$1" = "0" ]; then
155 /sbin/chkconfig --del flowd
159 if [ "$1" = "0" ]; then
165 %defattr(644,root,root,755)
166 %doc ChangeLog LICENSE README TODO
167 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flowd.conf
168 %attr(754,root,root) /etc/rc.d/init.d/flowd
169 %attr(755,root,root) %{_bindir}/flowd-reader
170 %attr(755,root,root) %{_sbindir}/flowd
171 %{_mandir}/man5/flowd.conf.5*
172 %{_mandir}/man8/flowd.8*
173 %{_mandir}/man8/flowd-reader.8*
176 %defattr(644,root,root,755)
178 %{perl_vendorarch}/Flowd.pm
179 %dir %{perl_vendorarch}/auto/Flowd
180 %{perl_vendorarch}/auto/Flowd/Flowd.bs
181 %attr(755,root,root) %{perl_vendorarch}/auto/Flowd/Flowd.so
182 %{_mandir}/man3/Flowd.3pm*
184 %files -n python-flowd
185 %defattr(644,root,root,755)
187 %attr(755,root,root) %{py_sitedir}/flowd.so
188 %if "%{py_ver}" > "2.4"
189 %{py_sitedir}/flowd-*.egg-info
193 %defattr(644,root,root,755)
197 %defattr(644,root,root,755)
199 %{_libdir}/libflowd.a