]> git.pld-linux.org Git - packages/flowd.git/blob - flowd.spec
- up to 0.9.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:        0.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 URL:            http://www.mindrot.org/flowd.html
16 BuildRequires:  byacc
17 BuildRequires:  perl-devel >= 1:5.8.0
18 BuildRequires:  python-devel
19 BuildRequires:  rpm-perlprov >= 4.1-13
20 BuildRequires:  rpmbuild(macros) >= 1.268
21 Requires(post,preun):   /sbin/chkconfig
22 Requires(postun):       /usr/sbin/groupdel
23 Requires(postun):       /usr/sbin/userdel
24 Requires(pre):  /bin/id
25 Requires(pre):  /usr/bin/getgid
26 Requires(pre):  /usr/sbin/groupadd
27 Requires(pre):  /usr/sbin/useradd
28 Requires:       rc-scripts
29 Provides:       group(flowd)
30 Provides:       user(flowd)
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
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
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.
44
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.
48
49 %package perl
50 Summary:        Perl API to access flowd logfiles
51 Summary(pl.UTF-8):      Perlowe API do dostępu do plików logów flowd
52 Group:          Development/Languages/Perl
53
54 %description perl
55 This is a Perl API to the binary flowd network flow log format and an
56 example reader application.
57
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.
61
62 %package python
63 Summary:        Python API to access flowd logfiles
64 Summary(pl.UTF-8):      Pythonowe API do dostępu do plików logów flowd
65 Group:          Applications/Networking
66 Requires:       python
67
68 %description python
69 This is a Python API to the binary flowd network flow log format and
70 an example reader application.
71
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.
75
76 %package tools
77 Summary:        Collection of example flowd tools
78 Summary(pl.UTF-8):      Zbiór przykładowych narzędzi dla flowd
79 Group:          Applications/Networking
80
81 %description tools
82 A collection of tools for use with flowd.
83
84 %description tools -l pl.UTF-8
85 Zbiór narzędzi do używania z flowd.
86
87 %package devel
88 Summary:        C API to access flowd logfiles
89 Summary(pl.UTF-8):      API C do dostępu do plików logów flowd
90 Group:          Development/Libraries
91
92 %description devel
93 This is a C API to the binary flowd network flow log format.
94
95 %description devel -l pl.UTF-8
96 Ten pakiet zawiera API C dla binarnego formatu plików logów przepływów
97 sieciowych flowd.
98
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
127 %{__make} -C Flowd-perl pure_install \
128         DESTDIR=$RPM_BUILD_ROOT
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
137 %groupadd -g 198 flowd
138 %useradd -u 198 -d /usr/share/empty -s /bin/false -c "flowd user" -g flowd flowd
139
140 %post
141 /sbin/chkconfig --add flowd
142 %service flowd restart "flowd daemon"
143
144 %preun
145 if [ "$1" = "0" ]; then
146         %service flowd stop
147         /sbin/chkconfig --del flowd
148 fi
149
150 %postun
151 if [ "$1" = "0" ]; then
152         %userremove flowd
153         %groupremove flowd
154 fi
155
156 %files
157 %defattr(644,root,root,755)
158 %doc ChangeLog LICENSE README TODO
159 #%%dir %%attr(111,root,root) %{_var}/empty
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
162 %attr(755,root,root) %{_bindir}/flowd-reader
163 %attr(755,root,root) %{_sbindir}/flowd
164 %{_mandir}/man5/flowd.conf.5*
165 %{_mandir}/man8/flowd.8*
166 %{_mandir}/man8/flowd-reader.8*
167
168 %files perl
169 %defattr(644,root,root,755)
170 #%%doc reader.pl
171 %{perl_vendorarch}/Flowd.pm
172 %dir %{perl_vendorarch}/auto/Flowd
173 %{perl_vendorarch}/auto/Flowd/Flowd.bs
174 %attr(755,root,root) %{perl_vendorarch}/auto/Flowd/Flowd.so
175 %{_mandir}/man3/Flowd.3pm*
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)
187 %{_includedir}/flowd
188 %{_libdir}/libflowd.a
This page took 0.039762 seconds and 4 git commands to generate.