updated build root and clean target
[nodeupdate.git] / NodeUpdate.spec
1 %define name NodeUpdate
2 %define version 0.2
3 %define release 3.planetlab%{?date:.%{date}}
4
5 Summary: PlanetLab service to periodically update node RPMS
6 Name: %{name}
7 Version: %{version}
8 Release: %{release}
9 Requires: python2 >= 2.2, yum >= 2.0.3-3_planetlab
10 Copyright: GPL
11 URL: http://www.planet-lab.org
12 Group: System Environment/Base
13 Source: %{name}-%{version}.tar.gz
14 BuildRoot: %{_tmppath}/%{name}-%{version}root
15
16 %description
17 PlanetLab service to periodically update node RPMS
18
19 %prep
20
21 %setup
22
23 %build
24
25
26 %install
27 mkdir -p $RPM_BUILD_ROOT/usr/local/planetlab/bin
28 cp NodeUpdate.py $RPM_BUILD_ROOT/usr/local/planetlab/bin/
29
30 %clean
31 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
32
33 %files
34 %defattr(-,root,root)
35 %attr(0755,root,root) /usr/local/planetlab/bin/NodeUpdate.py
36
37 %pre
38
39 %post
40 if [ "$1" = 1 ]; then
41         /usr/local/planetlab/bin/NodeUpdate.py updatecron
42 fi
43
44
45 %preun
46 if [ "$1" = 0 ]; then
47         /usr/local/planetlab/bin/NodeUpdate.py removecron
48 fi
49
50
51 %postun
52
53
54 %changelog
55 * Mon Apr 12 2004 Aaron K <alk@cs.princeton.edu>
56 - updated for new build process
57
58 * Mon Feb  2 2004 Aaron K <alk@cs.princeton.edu>
59 - new yum option for ssl cert dir used
60 - added noreboot option which ignores the reboot flag
61   (useful during install and/or boot time)
62
63 * Tue Oct 28 2003 Aaron K <Aaron.L.Klingaman@intel.com>
64 - Initial build.
65