ready for tagging
[nodemanager.git] / NodeManager.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define name NodeManager
7 %define version 1.6
8 %define taglevel 1
9
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11
12 Summary: PlanetLab Node Manager
13 Name: %{name}
14 Version: %{version}
15 Release: %{release}
16 License: PlanetLab
17 Group: System Environment/Daemons
18 URL: %(echo %{url} | cut -d ' ' -f 2)
19 Source0: %{name}-%{version}.tar.gz
20 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21
22 Vendor: PlanetLab
23 Packager: PlanetLab Central <support@planet-lab.org>
24 Distribution: PlanetLab %{plrelease}
25 URL: %(echo %{url} | cut -d ' ' -f 2)
26
27 # Old Node Manager
28 Obsoletes: sidewinder, sidewinder-common
29
30 # vuseradd, vuserdel
31 Requires: vserver-reference
32 Requires: util-vserver >= 0.30.208-17
33
34 # vserver.py
35 Requires: util-vserver-python
36
37 # Signed tickets
38 Requires: gnupg
39
40 # Contact API server
41 Requires: curl
42
43 # Uses function decorators
44 Requires: python >= 2.4
45
46 %description
47 The PlanetLab Node Manager manages all aspects of PlanetLab node and
48 slice management once the node has been initialized and configured by
49 the Boot Manager. It periodically contacts its management authority
50 for configuration updates. It provides an XML-RPC API for performing
51 local operations on slices.
52
53 %prep
54 %setup -q
55
56 %build
57 %{__make} %{?_smp_mflags}
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT"
62
63 install -D -m 755 conf_files.init $RPM_BUILD_ROOT/%{_initrddir}/conf_files
64 install -D -m 755 nm.init $RPM_BUILD_ROOT/%{_initrddir}/nm
65 install -D -m 644 nm.logrotate $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/nm
66
67 %post
68 chkconfig --add conf_files
69 chkconfig conf_files on
70 chkconfig --add nm
71 chkconfig nm on
72 if [ "$PL_BOOTCD" != "1" ] ; then
73         service nm restart
74 fi
75
76
77 %preun
78 # 0 = erase, 1 = upgrade
79 if [ $1 -eq 0 ] ; then
80     chkconfig nm off
81     chkconfig --del nm
82     chkconfig conf_files off
83     chkconfig --del conf_files
84 fi
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %files
90 %defattr(-,root,root,-)
91 %doc
92 %dir %{_datadir}/NodeManager
93 %{_datadir}/NodeManager/*
94 %{_bindir}/forward_api_calls
95 %{_initrddir}/nm
96 %{_initrddir}/conf_files
97 %{_sysconfdir}/logrotate.d/nm
98
99 %changelog
100 * Wed Oct 03 2007 Faiyaz Ahmed <faiyaza@cs.princeton.edu> .
101 - Switched to SVN.
102
103 * Mon Nov 13 2006 Mark Huang <mlhuang@paris.CS.Princeton.EDU> - 
104 - Initial build.