]> git.pld-linux.org Git - packages/flowd.git/blob - flowd.spec
perl 5.38.0 rebuild
[packages/flowd.git] / flowd.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4 #
5 Summary:        The flowd NetFlow collector daemon
6 Summary(pl.UTF-8):      flowd - demon zbierania danych NetFlow
7 Name:           flowd
8 Version:        0.9.1
9 Release:        18
10 License:        BSD
11 Group:          Applications/Networking
12 Source0:        http://www.mindrot.org/files/flowd/%{name}-%{version}.tar.gz
13 # Source0-md5:  a3d0512b5e6d9c7d9e749d9894376ea4
14 Patch0:         %{name}-username.patch
15 Patch1:         format-error.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.710
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 %patch1 -p1
107
108 %build
109 %configure
110 %{__make}
111
112 %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 %py_install
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 %attr(755,root,root) %{perl_vendorarch}/auto/Flowd/Flowd.so
179 %{_mandir}/man3/Flowd.3pm*
180
181 %files -n python-flowd
182 %defattr(644,root,root,755)
183 %doc reader.py
184 %attr(755,root,root) %{py_sitedir}/flowd.so
185 %if "%{py_ver}" > "2.4"
186 %{py_sitedir}/flowd-*.egg-info
187 %endif
188
189 %files tools
190 %defattr(644,root,root,755)
191 %doc tools/*
192
193 %files devel
194 %defattr(644,root,root,755)
195 %{_includedir}/flowd
196 %{_libdir}/libflowd.a
This page took 0.087691 seconds and 4 git commands to generate.