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