made specfile compliant with module-tag.py
[fprobe-ulog.git] / fprobe-ulog.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 # please keep these three lines as they are used by the tagging script
7 # see build/module-tag.py for details
8 %define name fprobe-ulog
9 %define version 1.1.2
10 %define taglevel 1
11
12 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
13
14 Name:           %{name}
15 Version:        %{version}
16 Release:        %{release}
17 Summary:        fprobe-ulog: a NetFlow probe
18 Group:          Network/Monitoring
19 License:        GPL
20 #URL:           http://fprobe.sourceforge.net
21 URL: %(echo %{url} | cut -d ' ' -f 2)
22 Source0:        %{name}-%{version}.tar.bz2
23 Buildroot:      %{_tmppath}/%{name}-buildroot
24 Provides:       fprobe-ulog
25
26 %description
27 fprobe-ulog - libipulog-based tool that collect network traffic data and emit
28 it as NetFlow flows towards the specified collector. PlanetLab version.
29
30 %prep
31 %setup -q
32
33 %build
34 ./configure --sbindir=/sbin --mandir=%{_mandir} --enable-uptime_trick=no $EXTRA_OPTIONS
35 make
36
37 %install
38 rm -rf %{buildroot}
39 make install DESTDIR=%{buildroot}
40 install -d -v %{buildroot}/etc/init.d
41 install -m 755 -v fprobe-initscript %{buildroot}/etc/init.d/fprobe-ulog
42 gzip --best %{buildroot}%{_mandir}/man8/fprobe-ulog.8
43
44 %clean
45 rm -rf %{buildroot}
46
47 %files
48 %defattr(-,root,root)
49 %doc AUTHORS ChangeLog NEWS README COPYING TODO
50 /etc/init.d/fprobe-ulog
51 /sbin/fprobe-ulog
52 %{_mandir}/man8/fprobe-ulog.8.gz
53
54 %post
55 mkdir -p /usr/local/fprobe
56 chkconfig --add fprobe-ulog
57 chkconfig fprobe-ulog on
58 if [ "$PL_BOOTCD" != "1" ] ; then
59         service fprobe-ulog start
60     fi
61
62 %preun
63 # 0 = erase, 1 = upgrade
64 if [ "$1" -eq 0 ]; then
65     if [ "$PL_BOOTCD" != "1" ] ; then
66         service fprobe-ulog stop
67     fi
68     chkconfig fprobe-ulog off
69     chkconfig --del fprobe-ulog
70 fi
71
72
73 %changelog