]> git.pld-linux.org Git - packages/flowd.git/blob - flowd.spec
f878ada67c71b2c0f9b694ee87410158e1e2735b
[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 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 perl
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
55 %description perl
56 This is a Perl API to the binary flowd network flow log format and an
57 example reader application.
58
59 %description perl -l pl.UTF-8
60 Ten pakiet zawiera API Perla dla binarnego formatu plików logów
61 przepływów sieciowych flowd oraz przykładowy program czytający.
62
63 %package python
64 Summary:        Python API to access flowd logfiles
65 Summary(pl.UTF-8):      Pythonowe API do dostępu do plików logów flowd
66 Group:          Applications/Networking
67 Requires:       python
68
69 %description python
70 This is a Python API to the binary flowd network flow log format and
71 an example reader application.
72
73 %description python -l pl.UTF-8
74 Ten pakiet zawiera API Pythona dla binarnego formatu plików logów
75 przepływów sieciowych flowd oraz przykładowy program czytający.
76
77 %package tools
78 Summary:        Collection of example flowd tools
79 Summary(pl.UTF-8):      Zbiór przykładowych narzędzi dla flowd
80 Group:          Applications/Networking
81
82 %description tools
83 A collection of tools for use with flowd.
84
85 %description tools -l pl.UTF-8
86 Zbiór narzędzi do używania z flowd.
87
88 %package devel
89 Summary:        C API to access flowd logfiles
90 Summary(pl.UTF-8):      API C do dostępu do plików logów flowd
91 Group:          Development/Libraries
92
93 %description devel
94 This is a C API to the binary flowd network flow log format.
95
96 %description devel -l pl.UTF-8
97 Ten pakiet zawiera API C dla binarnego formatu plików logów przepływów
98 sieciowych flowd.
99
100 %prep
101 %setup -q
102
103 %patch0 -p1
104
105 %build
106 %configure
107 #       --enable-gcc-warnings \
108
109 %{__make}
110
111 cd Flowd-perl
112 %{__perl} Makefile.PL \
113         INSTALLDIRS=vendor
114 %{__make}
115 %{?with_tests:%{__make} test}
116
117 #python setup.py install --root=$RPM_BUILD_ROOT --optimize=2
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121
122 %{__make} install \
123         DESTDIR=$RPM_BUILD_ROOT
124
125 # Misc stuff
126 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
127 install flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd
128
129 # Perl module
130 %{__make} -C Flowd-perl pure_install \
131         DESTDIR=$RPM_BUILD_ROOT
132
133 # Python module
134 ./setup.py install --optimize 1 --root=$RPM_BUILD_ROOT
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %pre
140 %groupadd -g 198 flowd
141 %useradd -u 198 -d /usr/share/empty -s /bin/false -c "flowd user" -g flowd flowd
142
143 %post
144 /sbin/chkconfig --add flowd
145 %service flowd restart "flowd daemon"
146
147 %preun
148 if [ "$1" = "0" ]; then
149         %service flowd stop
150         /sbin/chkconfig --del flowd
151 fi
152
153 %postun
154 if [ "$1" = "0" ]; then
155         %userremove flowd
156         %groupremove flowd
157 fi
158
159 %files
160 %defattr(644,root,root,755)
161 %doc ChangeLog LICENSE README TODO
162 #%%dir %%attr(111,root,root) %{_var}/empty
163 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flowd.conf
164 %attr(754,root,root) /etc/rc.d/init.d/flowd
165 %attr(755,root,root) %{_bindir}/flowd-reader
166 %attr(755,root,root) %{_sbindir}/flowd
167 %{_mandir}/man5/flowd.conf.5*
168 %{_mandir}/man8/flowd.8*
169 %{_mandir}/man8/flowd-reader.8*
170
171 %files perl
172 %defattr(644,root,root,755)
173 #%%doc reader.pl
174 %{perl_vendorarch}/Flowd.pm
175 %dir %{perl_vendorarch}/auto/Flowd
176 %{perl_vendorarch}/auto/Flowd/Flowd.bs
177 %attr(755,root,root) %{perl_vendorarch}/auto/Flowd/Flowd.so
178 %{_mandir}/man3/Flowd.3pm*
179
180 %files python
181 %defattr(644,root,root,755)
182 %doc reader.py
183
184 %files tools
185 %defattr(644,root,root,755)
186 %doc tools/*
187
188 %files devel
189 %defattr(644,root,root,755)
190 %{_includedir}/flowd
191 %{_libdir}/libflowd.a
This page took 0.111166 seconds and 2 git commands to generate.