bump release number
[pingofdeath.git] / ipod.spec
1 %define name ipod
2 %define version 2.0
3 %define release 5.planetlab%{?date:.%{date}}
4
5 Vendor: PlanetLab
6 Packager: PlanetLab Central <support@planet-lab.org>
7 Distribution: PlanetLab 3.0
8 URL: http://cvs.planet-lab.org/cvs/ipod
9
10 Summary: PlanetLab ICMP Ping of Death
11 Name: %{name}
12 Version: %{version}
13 Release: %{release}
14 Copyright: GPL
15 Group: System Environment/Kernel
16 Source: %{name}-%{version}.tar.gz
17 BuildRoot: %{_tmppath}/%{name}-%{version}root
18
19 %description
20 Startup service to enable Ping Of Death
21
22 %prep
23
24 %setup
25
26 %build
27 make
28
29
30 %install
31 mkdir -p $RPM_BUILD_ROOT/usr/local/planetlab/bin
32 mkdir -p $RPM_BUILD_ROOT/etc/init.d
33
34 cp pl-poddoit $RPM_BUILD_ROOT/usr/local/planetlab/bin/
35 cp pod $RPM_BUILD_ROOT/etc/init.d/
36
37
38 %clean
39 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
40
41
42 %files
43 %defattr(0755, root, root)
44 /etc/init.d/pod
45 /usr/local/planetlab/bin/pl-poddoit
46
47 %pre
48
49 %post 
50 RUNLEVEL=`/sbin/runlevel`
51
52 if [ "$1" = 1 ]; then
53         chkconfig --add pod
54         chkconfig pod on
55
56         if [[ "$RUNLEVEL" != "unknown" ]]; then
57                 /etc/init.d/pod start
58         fi
59 fi
60
61 %preun
62 if [ "$1" = 0 ]; then
63         chkconfig pod off
64         chkconfig --del pod
65 fi
66
67 %postun
68
69
70 %changelog
71 * Mon Apr 12 2004 Aaron Klingaman <alk@cs.princeton.edu>
72 - moved to new build process
73 - added change log