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: rpm-perlprov >= 4.1-13
21 BuildRequires: rpmbuild(macros) >= 1.268
22 Requires(post,preun): /sbin/chkconfig
23 Requires(postun): /usr/sbin/groupdel
24 Requires(postun): /usr/sbin/userdel
25 Requires(pre): /bin/id
26 Requires(pre): /usr/bin/getgid
27 Requires(pre): /usr/sbin/groupadd
28 Requires(pre): /usr/sbin/useradd
30 Provides: group(flowd)
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 This is flowd, a NetFlow collector daemon intended to be small, fast
38 It features some basic filtering to limit or tag the flows that are
39 recorded and is privilege separated, to limit security exposure from
42 %description -l pl.UTF-8
43 Ten pakiet zawiera program flowd - demona zbierającego dane NetFlow,
44 mającego być małym, szybkim i bezpiecznym.
46 Obsługuje podstawowe filtrowanie w celu ograniczania lub znakowania
47 zapisywanych przepływów, ma rozdzielenie uprawnień w celu ograniczenia
48 wpływu własnych błedów na bezpieczeństwo.
50 %package -n perl-Flowd
51 Summary: Perl API to access flowd logfiles
52 Summary(pl.UTF-8): Perlowe API do dostępu do plików logów flowd
53 Group: Development/Languages/Perl
56 %description -n perl-Flowd
57 This is a Perl API to the binary flowd network flow log format and an
58 example reader application.
60 %description -n perl-Flowd -l pl.UTF-8
61 Ten pakiet zawiera API Perla dla binarnego formatu plików logów
62 przepływów sieciowych flowd oraz przykładowy program czytający.
64 %package -n python-flowd
65 Summary: Python API to access flowd logfiles
66 Summary(pl.UTF-8): Pythonowe API do dostępu do plików logów flowd
67 Group: Applications/Networking
68 Obsoletes: python-flowd
70 %description -n python-flowd
71 This is a Python API to the binary flowd network flow log format and
72 an example reader application.
74 %description -n python-flowd -l pl.UTF-8
75 Ten pakiet zawiera API Pythona dla binarnego formatu plików logów
76 przepływów sieciowych flowd oraz przykładowy program czytający.
79 Summary: Collection of example flowd tools
80 Summary(pl.UTF-8): Zbiór przykładowych narzędzi dla flowd
81 Group: Applications/Networking
84 A collection of tools for use with flowd.
86 %description tools -l pl.UTF-8
87 Zbiór narzędzi do używania z flowd.
90 Summary: C API to access flowd logfiles
91 Summary(pl.UTF-8): API C do dostępu do plików logów flowd
92 Group: Development/Libraries
95 This is a C API to the binary flowd network flow log format.
97 %description devel -l pl.UTF-8
98 Ten pakiet zawiera API C dla binarnego formatu plików logów przepływów
109 CFLAGS="%{rpmcflags}" \
110 %{__python} setup.py build
113 %{__perl} Makefile.PL \
116 %{?with_tests:%{__make} test}
119 rm -rf $RPM_BUILD_ROOT
122 DESTDIR=$RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
126 install -p flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd
129 %{__make} -C Flowd-perl pure_install \
130 DESTDIR=$RPM_BUILD_ROOT
132 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Flowd/.packlist
135 %{__python} setup.py install \
137 --root=$RPM_BUILD_ROOT
140 rm -rf $RPM_BUILD_ROOT
143 %groupadd -g 198 flowd
144 %useradd -u 198 -d /usr/share/empty -s /bin/false -c "flowd user" -g flowd flowd
147 /sbin/chkconfig --add flowd
148 %service flowd restart "flowd daemon"
151 if [ "$1" = "0" ]; then
153 /sbin/chkconfig --del flowd
157 if [ "$1" = "0" ]; then
163 %defattr(644,root,root,755)
164 %doc ChangeLog LICENSE README TODO
165 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flowd.conf
166 %attr(754,root,root) /etc/rc.d/init.d/flowd
167 %attr(755,root,root) %{_bindir}/flowd-reader
168 %attr(755,root,root) %{_sbindir}/flowd
169 %{_mandir}/man5/flowd.conf.5*
170 %{_mandir}/man8/flowd.8*
171 %{_mandir}/man8/flowd-reader.8*
174 %defattr(644,root,root,755)
176 %{perl_vendorarch}/Flowd.pm
177 %dir %{perl_vendorarch}/auto/Flowd
178 %{perl_vendorarch}/auto/Flowd/Flowd.bs
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