support pldistro "variants"
[pingofdeath.git] / ipod.spec
1 %define name ipod
2 %define version 2.1
3 %define release 1%{?pldistro:.%{pldistro}}%{?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 if [ "$1" = 1 ]; then
51         chkconfig --add pod
52         chkconfig pod on
53
54         if [[ "$PL_BOOTCD" != "1" ]] ; then
55                 /etc/init.d/pod start
56         fi
57 fi
58
59 %preun
60 if [ "$1" = 0 ]; then
61         chkconfig pod off
62         chkconfig --del pod
63 fi
64
65 %postun
66
67
68 %changelog
69 * Fri Aug  5 2005 Aaron Klingaman <alk@absarokasoft.com>
70 - updated to use new source of POD Hash (/etc/planetlab/session)
71 - minor build changes to simply build process
72 - remove unnecessary call to runlevel in post section
73
74 * Mon Apr 12 2004 Aaron Klingaman <alk@cs.princeton.edu>
75 - moved to new build process
76 - added change log