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.710
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
116 %{__perl} Makefile.PL \
119 %{?with_tests:%{__make} test}
122 rm -rf $RPM_BUILD_ROOT
125 DESTDIR=$RPM_BUILD_ROOT
128 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
129 install -p flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd
132 %{__make} -C Flowd-perl pure_install \
133 DESTDIR=$RPM_BUILD_ROOT
135 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Flowd/.packlist
141 rm -rf $RPM_BUILD_ROOT
144 %groupadd -g 198 flowd
145 %useradd -u 198 -d /usr/share/empty -s /bin/false -c "flowd user" -g flowd flowd
148 /sbin/chkconfig --add flowd
149 %service flowd restart "flowd daemon"
152 if [ "$1" = "0" ]; then
154 /sbin/chkconfig --del flowd
158 if [ "$1" = "0" ]; then
164 %defattr(644,root,root,755)
165 %doc ChangeLog LICENSE README TODO
166 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flowd.conf
167 %attr(754,root,root) /etc/rc.d/init.d/flowd
168 %attr(755,root,root) %{_bindir}/flowd-reader
169 %attr(755,root,root) %{_sbindir}/flowd
170 %{_mandir}/man5/flowd.conf.5*
171 %{_mandir}/man8/flowd.8*
172 %{_mandir}/man8/flowd-reader.8*
175 %defattr(644,root,root,755)
177 %{perl_vendorarch}/Flowd.pm
178 %dir %{perl_vendorarch}/auto/Flowd
179 %attr(755,root,root) %{perl_vendorarch}/auto/Flowd/Flowd.so
180 %{_mandir}/man3/Flowd.3pm*
182 %files -n python-flowd
183 %defattr(644,root,root,755)
185 %attr(755,root,root) %{py_sitedir}/flowd.so
186 %if "%{py_ver}" > "2.4"
187 %{py_sitedir}/flowd-*.egg-info
191 %defattr(644,root,root,755)
195 %defattr(644,root,root,755)
197 %{_libdir}/libflowd.a