Merged 4.1 branch
[fprobe-ulog.git] / fprobe-ulog.spec
index dc9586c..234da13 100644 (file)
@@ -1,5 +1,5 @@
 Name:          fprobe-ulog
-Version:       1.1
+Version:       1.1.1
 Release:       1
 Summary:       fprobe-ulog: a NetFlow probe
 Group:         Network/Monitoring
@@ -11,18 +11,20 @@ Provides:   fprobe-ulog
 
 %description
 fprobe-ulog - libipulog-based tool that collect network traffic data and emit
-it as NetFlow flows towards the specified collector.
+it as NetFlow flows towards the specified collector. PlanetLab vesion.
 
 %prep
 %setup -q
 
 %build
-./configure --sbindir=%{_sbindir} --mandir=%{_mandir} $EXTRA_OPTIONS
+./configure --sbindir=/sbin --mandir=%{_mandir} --enable-uptime_trick=no $EXTRA_OPTIONS
 make
 
 %install
 rm -rf %{buildroot}
-make install-strip DESTDIR=%{buildroot}
+make install DESTDIR=%{buildroot}
+install -d -v %{buildroot}/etc/init.d
+install -m 755 -v fprobe-initscript %{buildroot}/etc/init.d/fprobe-ulog
 gzip --best %{buildroot}%{_mandir}/man8/fprobe-ulog.8
 
 %clean
@@ -31,4 +33,26 @@ rm -rf %{buildroot}
 %files
 %defattr(-,root,root)
 %doc AUTHORS ChangeLog NEWS README COPYING TODO
-/*
+/etc/init.d/fprobe-ulog
+/sbin/fprobe-ulog
+%{_mandir}/man8/fprobe-ulog.8.gz
+
+%post
+chkconfig --add fprobe-ulog
+chkconfig fprobe-ulog on
+if [ "$PL_BOOTCD" != "1" ] ; then
+       service fprobe-ulog start
+    fi
+
+%preun
+# 0 = erase, 1 = upgrade
+if [ "$1" -eq 0 ]; then
+    if [ "$PL_BOOTCD" != "1" ] ; then
+       service fprobe-ulog stop
+    fi
+    chkconfig fprobe-ulog off
+    chkconfig --del fprobe-ulog
+fi
+
+
+%changelog