]>
Commit | Line | Data |
---|---|---|
f51ce8dd MP |
1 | # |
2 | # Conditional build: | |
f51ce8dd MP |
3 | %bcond_without tests # build without tests |
4 | # | |
0ead87ef | 5 | %include /usr/lib/rpm/macros.perl |
f51ce8dd | 6 | Summary: The flowd NetFlow collector daemon |
310b3877 | 7 | Summary(pl.UTF-8): flowd - demon zbierania danych NetFlow |
f51ce8dd MP |
8 | Name: flowd |
9 | Version: 0.9 | |
15de0a57 | 10 | Release: 2 |
f51ce8dd MP |
11 | License: BSD |
12 | Group: Applications/Networking | |
f51ce8dd MP |
13 | Source0: http://www.mindrot.org/files/flowd/%{name}-%{version}.tar.gz |
14 | # Source0-md5: 442917bb3c66a81786e9ab1d40006122 | |
0ead87ef | 15 | URL: http://www.mindrot.org/flowd.html |
5df1ef9a | 16 | BuildRequires: byacc |
17 | BuildRequires: python-devel | |
f51ce8dd MP |
18 | BuildRequires: perl-devel >= 1:5.8.0 |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
0ead87ef JB |
20 | BuildRequires: rpmbuild(macros) >= 1.268 |
21 | Requires(pre): /bin/id | |
22 | Requires(pre): /usr/bin/getgid | |
23 | Requires(pre): /usr/sbin/groupadd | |
24 | Requires(pre): /usr/sbin/useradd | |
25 | Requires(post,preun): /sbin/chkconfig | |
26 | Requires(postun): /usr/sbin/groupdel | |
27 | Requires(postun): /usr/sbin/userdel | |
28 | Requires: rc-scripts | |
29 | Provides: group(_flowd) | |
30 | Provides: user(_flowd) | |
f51ce8dd MP |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
f51ce8dd MP |
33 | %description |
34 | This is flowd, a NetFlow collector daemon intended to be small, fast | |
35 | and secure. | |
36 | ||
37 | It features some basic filtering to limit or tag the flows that are | |
38 | recorded and is privilege separated, to limit security exposure from | |
39 | bugs in flowd itself. | |
40 | ||
2b90fc17 JR |
41 | %description -l pl.UTF-8 |
42 | Ten pakiet zawiera program flowd - demona zbierającego dane NetFlow, | |
43 | mającego być małym, szybkim i bezpiecznym. | |
0ead87ef | 44 | |
2b90fc17 JR |
45 | Obsługuje podstawowe filtrowanie w celu ograniczania lub znakowania |
46 | zapisywanych przepływów, ma rozdzielenie uprawnień w celu ograniczenia | |
47 | wpływu własnych błedów na bezpieczeństwo. | |
0ead87ef JB |
48 | |
49 | %package perl | |
50 | Summary: Perl API to access flowd logfiles | |
310b3877 | 51 | Summary(pl.UTF-8): Perlowe API do dostępu do plików logów flowd |
0ead87ef JB |
52 | Group: Development/Languages/Perl |
53 | ||
f51ce8dd MP |
54 | %description perl |
55 | This is a Perl API to the binary flowd network flow log format and an | |
0ead87ef JB |
56 | example reader application. |
57 | ||
2b90fc17 JR |
58 | %description perl -l pl.UTF-8 |
59 | Ten pakiet zawiera API Perla dla binarnego formatu plików logów | |
60 | przepływów sieciowych flowd oraz przykładowy program czytający. | |
0ead87ef JB |
61 | |
62 | %package python | |
63 | Summary: Python API to access flowd logfiles | |
310b3877 | 64 | Summary(pl.UTF-8): Pythonowe API do dostępu do plików logów flowd |
0ead87ef JB |
65 | Group: Applications/Networking |
66 | Requires: python | |
f51ce8dd MP |
67 | |
68 | %description python | |
69 | This is a Python API to the binary flowd network flow log format and | |
0ead87ef JB |
70 | an example reader application. |
71 | ||
2b90fc17 JR |
72 | %description python -l pl.UTF-8 |
73 | Ten pakiet zawiera API Pythona dla binarnego formatu plików logów | |
74 | przepływów sieciowych flowd oraz przykładowy program czytający. | |
0ead87ef JB |
75 | |
76 | %package tools | |
77 | Summary: Collection of example flowd tools | |
310b3877 | 78 | Summary(pl.UTF-8): Zbiór przykładowych narzędzi dla flowd |
0ead87ef | 79 | Group: Applications/Networking |
f51ce8dd MP |
80 | |
81 | %description tools | |
0ead87ef JB |
82 | A collection of tools for use with flowd. |
83 | ||
2b90fc17 JR |
84 | %description tools -l pl.UTF-8 |
85 | Zbiór narzędzi do używania z flowd. | |
0ead87ef JB |
86 | |
87 | %package devel | |
88 | Summary: C API to access flowd logfiles | |
310b3877 | 89 | Summary(pl.UTF-8): API C do dostępu do plików logów flowd |
0ead87ef | 90 | Group: Development/Libraries |
f51ce8dd MP |
91 | |
92 | %description devel | |
93 | This is a C API to the binary flowd network flow log format. | |
94 | ||
2b90fc17 JR |
95 | %description devel -l pl.UTF-8 |
96 | Ten pakiet zawiera API C dla binarnego formatu plików logów przepływów | |
0ead87ef JB |
97 | sieciowych flowd. |
98 | ||
f51ce8dd MP |
99 | %prep |
100 | %setup -q | |
101 | ||
102 | %build | |
103 | %configure | |
104 | # --enable-gcc-warnings \ | |
105 | ||
106 | %{__make} | |
107 | ||
108 | cd Flowd-perl | |
109 | %{__perl} Makefile.PL \ | |
110 | INSTALLDIRS=vendor | |
111 | %{__make} | |
112 | %{?with_tests:%{__make} test} | |
113 | ||
114 | #python setup.py install --root=$RPM_BUILD_ROOT --optimize=2 | |
115 | ||
116 | %install | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %{__make} install \ | |
120 | DESTDIR=$RPM_BUILD_ROOT | |
121 | ||
122 | # Misc stuff | |
123 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
124 | install flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd | |
125 | ||
126 | # Perl module | |
0ead87ef | 127 | %{__make} -C Flowd-perl pure_install \ |
f51ce8dd | 128 | DESTDIR=$RPM_BUILD_ROOT |
f51ce8dd MP |
129 | |
130 | # Python module | |
131 | ./setup.py install --optimize 1 --root=$RPM_BUILD_ROOT | |
132 | ||
133 | %clean | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
136 | %pre | |
0ead87ef JB |
137 | %groupadd -g XXX _flowd |
138 | %useradd -u XXX -d /usr/share/empty -s /bin/false -c "flowd user" -g _flowd _flowd | |
f51ce8dd MP |
139 | |
140 | %post | |
141 | /sbin/chkconfig --add flowd | |
0ead87ef | 142 | %service flowd restart "flowd daemon" |
f51ce8dd MP |
143 | |
144 | %preun | |
0ead87ef JB |
145 | if [ "$1" = "0" ]; then |
146 | %service flowd stop | |
f51ce8dd MP |
147 | /sbin/chkconfig --del flowd |
148 | fi | |
149 | ||
0ead87ef JB |
150 | %postun |
151 | if [ "$1" = "0" ]; then | |
152 | %userremove _flowd | |
153 | %groupremove _flowd | |
154 | fi | |
155 | ||
f51ce8dd MP |
156 | %files |
157 | %defattr(644,root,root,755) | |
158 | %doc ChangeLog LICENSE README TODO | |
159 | #%%dir %%attr(111,root,root) %{_var}/empty | |
0ead87ef JB |
160 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flowd.conf |
161 | %attr(754,root,root) /etc/rc.d/init.d/flowd | |
f51ce8dd | 162 | %attr(755,root,root) %{_bindir}/flowd-reader |
f51ce8dd | 163 | %attr(755,root,root) %{_sbindir}/flowd |
0ead87ef JB |
164 | %{_mandir}/man5/flowd.conf.5* |
165 | %{_mandir}/man8/flowd.8* | |
166 | %{_mandir}/man8/flowd-reader.8* | |
f51ce8dd MP |
167 | |
168 | %files perl | |
169 | %defattr(644,root,root,755) | |
170 | #%%doc reader.pl | |
171 | %{perl_vendorarch}/Flowd.pm | |
0ead87ef | 172 | %dir %{perl_vendorarch}/auto/Flowd |
f51ce8dd | 173 | %{perl_vendorarch}/auto/Flowd/Flowd.bs |
0ead87ef | 174 | %attr(755,root,root) %{perl_vendorarch}/auto/Flowd/Flowd.so |
f51ce8dd MP |
175 | %{_mandir}/man3/* |
176 | ||
177 | %files python | |
178 | %defattr(644,root,root,755) | |
179 | %doc reader.py | |
180 | ||
181 | %files tools | |
182 | %defattr(644,root,root,755) | |
183 | %doc tools/* | |
184 | ||
185 | %files devel | |
186 | %defattr(644,root,root,755) | |
0ead87ef JB |
187 | %{_includedir}/flowd |
188 | %{_libdir}/libflowd.a |