Merged 4.1 branch
[fprobe-ulog.git] / fprobe-ulog.spec
1 Name:           fprobe-ulog
2 Version:        1.1.1
3 Release:        1
4 Summary:        fprobe-ulog: a NetFlow probe
5 Group:          Network/Monitoring
6 License:        GPL
7 URL:            http://fprobe.sourceforge.net
8 Source0:        %{name}-%{version}.tar.bz2
9 Buildroot:      %{_tmppath}/%{name}-buildroot
10 Provides:       fprobe-ulog
11
12 %description
13 fprobe-ulog - libipulog-based tool that collect network traffic data and emit
14 it as NetFlow flows towards the specified collector. PlanetLab vesion.
15
16 %prep
17 %setup -q
18
19 %build
20 ./configure --sbindir=/sbin --mandir=%{_mandir} --enable-uptime_trick=no $EXTRA_OPTIONS
21 make
22
23 %install
24 rm -rf %{buildroot}
25 make install DESTDIR=%{buildroot}
26 install -d -v %{buildroot}/etc/init.d
27 install -m 755 -v fprobe-initscript %{buildroot}/etc/init.d/fprobe-ulog
28 gzip --best %{buildroot}%{_mandir}/man8/fprobe-ulog.8
29
30 %clean
31 rm -rf %{buildroot}
32
33 %files
34 %defattr(-,root,root)
35 %doc AUTHORS ChangeLog NEWS README COPYING TODO
36 /etc/init.d/fprobe-ulog
37 /sbin/fprobe-ulog
38 %{_mandir}/man8/fprobe-ulog.8.gz
39
40 %post
41 chkconfig --add fprobe-ulog
42 chkconfig fprobe-ulog on
43 if [ "$PL_BOOTCD" != "1" ] ; then
44         service fprobe-ulog start
45     fi
46
47 %preun
48 # 0 = erase, 1 = upgrade
49 if [ "$1" -eq 0 ]; then
50     if [ "$PL_BOOTCD" != "1" ] ; then
51         service fprobe-ulog stop
52     fi
53     chkconfig fprobe-ulog off
54     chkconfig --del fprobe-ulog
55 fi
56
57
58 %changelog