mark pod.py as running on python2
[pingofdeath.git] / ipod.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define name ipod
7 %define version 2.2
8 %define taglevel 1
9
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11
12 Vendor: PlanetLab
13 Packager: PlanetLab Central <support@planet-lab.org>
14 Distribution: PlanetLab %{plrelease}
15 URL: %(echo %{url} | cut -d ' ' -f 2)
16
17 Summary: PlanetLab ICMP/UDP Ping of Death
18 Name: %{name}
19 Version: %{version}
20 Release: %{release}
21 License: GPL
22 Group: System Environment/Kernel
23 Source: %{name}-%{version}.tar.gz
24 BuildRoot: %{_tmppath}/%{name}-%{version}root
25
26 %description
27 Startup service to enable Ping Of Death
28
29 %package client
30 Summary: PlanetLab ICMP/UDP Ping of Death Client Tools
31 Group: System Environment/Kernel
32 Requires: python
33
34 %description client
35 Client utilities to use Ping of Death
36
37 %prep
38
39 %setup
40
41 %build
42 make
43
44
45 %install
46 # ipod
47 mkdir -p $RPM_BUILD_ROOT/usr/local/planetlab/bin
48 mkdir -p $RPM_BUILD_ROOT/etc/init.d
49
50 cp pl-poddoit $RPM_BUILD_ROOT/usr/local/planetlab/bin/
51 cp pod $RPM_BUILD_ROOT/etc/init.d/
52
53 # ipod-client
54 mkdir -p $RPM_BUILD_ROOT/usr/bin/
55 cp pod.py $RPM_BUILD_ROOT/usr/bin
56
57 %clean
58 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
59
60
61 %files
62 %defattr(0755, root, root)
63 /etc/init.d/pod
64 /usr/local/planetlab/bin/pl-poddoit
65
66 %files client
67 %defattr(0755, root, root)
68 /usr/bin/pod.py*
69
70
71 %pre
72
73 %post 
74 if [ "$1" = 1 ]; then
75         chkconfig --add pod
76         chkconfig pod on
77
78         if [[ "$PL_BOOTCD" != "1" ]] ; then
79                 /etc/init.d/pod start
80         fi
81 fi
82
83 %preun
84 if [ "$1" = 0 ]; then
85         chkconfig pod off
86         chkconfig --del pod
87 fi
88
89 %postun
90
91
92 %changelog
93 * Wed Jan 11 2006 Aaron Klingaman <alk@absarokasoft.com>
94 - add support for building client tool rpm
95
96 * Fri Aug  5 2005 Aaron Klingaman <alk@absarokasoft.com>
97 - updated to use new source of POD Hash (/etc/planetlab/session)
98 - minor build changes to simply build process
99 - remove unnecessary call to runlevel in post section
100
101 * Mon Apr 12 2004 Aaron Klingaman <alk@cs.princeton.edu>
102 - moved to new build process
103 - added change log