]> git.pld-linux.org Git - packages/flowd.git/blob - flowd.spec
- rename binding packages, finish python files, cleanups; rel 1
[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:        1
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 URL:            http://www.mindrot.org/flowd.html
17 BuildRequires:  byacc
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
29 Requires:       rc-scripts
30 Provides:       group(flowd)
31 Provides:       user(flowd)
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 This is flowd, a NetFlow collector daemon intended to be small, fast
36 and secure.
37
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
40 bugs in flowd itself.
41
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.
45
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.
49
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
54 Obsoletes:      flowd-perl
55
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.
59
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.
63
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
69
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.
73
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.
77
78 %package tools
79 Summary:        Collection of example flowd tools
80 Summary(pl.UTF-8):      Zbiór przykładowych narzędzi dla flowd
81 Group:          Applications/Networking
82
83 %description tools
84 A collection of tools for use with flowd.
85
86 %description tools -l pl.UTF-8
87 Zbiór narzędzi do używania z flowd.
88
89 %package devel
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
93
94 %description devel
95 This is a C API to the binary flowd network flow log format.
96
97 %description devel -l pl.UTF-8
98 Ten pakiet zawiera API C dla binarnego formatu plików logów przepływów
99 sieciowych flowd.
100
101 %prep
102 %setup -q
103 %patch0 -p1
104
105 %build
106 %configure
107 %{__make}
108
109 CFLAGS="%{rpmcflags}" \
110 %{__python} setup.py build
111
112 cd Flowd-perl
113 %{__perl} Makefile.PL \
114         INSTALLDIRS=vendor
115 %{__make}
116 %{?with_tests:%{__make} test}
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120
121 %{__make} install \
122         DESTDIR=$RPM_BUILD_ROOT
123
124 # Misc stuff
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
127
128 # Perl module
129 %{__make} -C Flowd-perl pure_install \
130         DESTDIR=$RPM_BUILD_ROOT
131
132 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Flowd/.packlist
133
134 # Python module
135 %{__python} setup.py install \
136         --optimize=2 \
137         --root=$RPM_BUILD_ROOT
138
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %pre
143 %groupadd -g 198 flowd
144 %useradd -u 198 -d /usr/share/empty -s /bin/false -c "flowd user" -g flowd flowd
145
146 %post
147 /sbin/chkconfig --add flowd
148 %service flowd restart "flowd daemon"
149
150 %preun
151 if [ "$1" = "0" ]; then
152         %service flowd stop
153         /sbin/chkconfig --del flowd
154 fi
155
156 %postun
157 if [ "$1" = "0" ]; then
158         %userremove flowd
159         %groupremove flowd
160 fi
161
162 %files
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*
172
173 %files -n perl-Flowd
174 %defattr(644,root,root,755)
175 %doc reader.pl
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*
181
182 %files -n python-flowd
183 %defattr(644,root,root,755)
184 %doc reader.py
185 %attr(755,root,root) %{py_sitedir}/flowd.so
186 %if "%{py_ver}" > "2.4"
187 %{py_sitedir}/flowd-*.egg-info
188 %endif
189
190 %files tools
191 %defattr(644,root,root,755)
192 %doc tools/*
193
194 %files devel
195 %defattr(644,root,root,755)
196 %{_includedir}/flowd
197 %{_libdir}/libflowd.a
This page took 0.090038 seconds and 3 git commands to generate.