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