]> git.pld-linux.org Git - packages/flowd.git/blob - flowd.spec
- rel 5
[packages/flowd.git] / flowd.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4 #
5 %include        /usr/lib/rpm/macros.perl
6 Summary:        The flowd NetFlow collector daemon
7 Summary(pl.UTF-8):      flowd - demon zbierania danych NetFlow
8 Name:           flowd
9 Version:        0.9.1
10 Release:        5
11 License:        BSD
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
18 BuildRequires:  byacc
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
32 Requires:       rc-scripts
33 Provides:       group(flowd)
34 Provides:       user(flowd)
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 This is flowd, a NetFlow collector daemon intended to be small, fast
39 and secure.
40
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
43 bugs in flowd itself.
44
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.
48
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.
52
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
57 Obsoletes:      flowd-perl
58
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.
62
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.
66
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
72
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.
76
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.
80
81 %package tools
82 Summary:        Collection of example flowd tools
83 Summary(pl.UTF-8):      Zbiór przykładowych narzędzi dla flowd
84 Group:          Applications/Networking
85
86 %description tools
87 A collection of tools for use with flowd.
88
89 %description tools -l pl.UTF-8
90 Zbiór narzędzi do używania z flowd.
91
92 %package devel
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
96
97 %description devel
98 This is a C API to the binary flowd network flow log format.
99
100 %description devel -l pl.UTF-8
101 Ten pakiet zawiera API C dla binarnego formatu plików logów przepływów
102 sieciowych flowd.
103
104 %prep
105 %setup -q
106 %patch0 -p1
107 %patch1 -p1
108
109 %build
110 %configure
111 %{__make}
112
113 CFLAGS="%{rpmcflags}" \
114 %{__python} setup.py build
115
116 cd Flowd-perl
117 %{__perl} Makefile.PL \
118         INSTALLDIRS=vendor
119 %{__make}
120 %{?with_tests:%{__make} test}
121
122 %install
123 rm -rf $RPM_BUILD_ROOT
124
125 %{__make} install \
126         DESTDIR=$RPM_BUILD_ROOT
127
128 # Misc stuff
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
131
132 # Perl module
133 %{__make} -C Flowd-perl pure_install \
134         DESTDIR=$RPM_BUILD_ROOT
135
136 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Flowd/.packlist
137
138 # Python module
139 %{__python} setup.py install \
140         --optimize=2 \
141         --root=$RPM_BUILD_ROOT
142
143 %clean
144 rm -rf $RPM_BUILD_ROOT
145
146 %pre
147 %groupadd -g 198 flowd
148 %useradd -u 198 -d /usr/share/empty -s /bin/false -c "flowd user" -g flowd flowd
149
150 %post
151 /sbin/chkconfig --add flowd
152 %service flowd restart "flowd daemon"
153
154 %preun
155 if [ "$1" = "0" ]; then
156         %service flowd stop
157         /sbin/chkconfig --del flowd
158 fi
159
160 %postun
161 if [ "$1" = "0" ]; then
162         %userremove flowd
163         %groupremove flowd
164 fi
165
166 %files
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*
176
177 %files -n perl-Flowd
178 %defattr(644,root,root,755)
179 %doc reader.pl
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*
185
186 %files -n python-flowd
187 %defattr(644,root,root,755)
188 %doc reader.py
189 %attr(755,root,root) %{py_sitedir}/flowd.so
190 %if "%{py_ver}" > "2.4"
191 %{py_sitedir}/flowd-*.egg-info
192 %endif
193
194 %files tools
195 %defattr(644,root,root,755)
196 %doc tools/*
197
198 %files devel
199 %defattr(644,root,root,755)
200 %{_includedir}/flowd
201 %{_libdir}/libflowd.a
This page took 0.141631 seconds and 3 git commands to generate.