- MyPLC 0.4 RC2
[pingofdeath.git] / ipod.spec
1 %define name ipod
2 %define version 2.2
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/UDP Ping of Death
11 Name: %{name}
12 Version: %{version}
13 Release: %{release}
14 License: 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 %package client
23 Summary: PlanetLab ICMP/UDP Ping of Death Client Tools
24 Group: System Environment/Kernel
25 Requires: python
26
27 %description client
28 Client utilities to use Ping of Death
29
30 %prep
31
32 %setup
33
34 %build
35 make
36
37
38 %install
39 # ipod
40 mkdir -p $RPM_BUILD_ROOT/usr/local/planetlab/bin
41 mkdir -p $RPM_BUILD_ROOT/etc/init.d
42
43 cp pl-poddoit $RPM_BUILD_ROOT/usr/local/planetlab/bin/
44 cp pod $RPM_BUILD_ROOT/etc/init.d/
45
46 # ipod-client
47 mkdir -p $RPM_BUILD_ROOT/usr/bin/
48 cp pod.py $RPM_BUILD_ROOT/usr/bin
49
50 %clean
51 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
52
53
54 %files
55 %defattr(0755, root, root)
56 /etc/init.d/pod
57 /usr/local/planetlab/bin/pl-poddoit
58
59 %files client
60 %defattr(0755, root, root)
61 /usr/bin/pod.py
62
63
64 %pre
65
66 %post 
67 if [ "$1" = 1 ]; then
68         chkconfig --add pod
69         chkconfig pod on
70
71         if [[ "$PL_BOOTCD" != "1" ]] ; then
72                 /etc/init.d/pod start
73         fi
74 fi
75
76 %preun
77 if [ "$1" = 0 ]; then
78         chkconfig pod off
79         chkconfig --del pod
80 fi
81
82 %postun
83
84
85 %changelog
86 * Wed Jan 11 2006 Aaron Klingaman <alk@absarokasoft.com>
87 - add support for building client tool rpm
88
89 * Fri Aug  5 2005 Aaron Klingaman <alk@absarokasoft.com>
90 - updated to use new source of POD Hash (/etc/planetlab/session)
91 - minor build changes to simply build process
92 - remove unnecessary call to runlevel in post section
93
94 * Mon Apr 12 2004 Aaron Klingaman <alk@cs.princeton.edu>
95 - moved to new build process
96 - added change log