1 # Fedora Core release version to base the installation on. Currently
6 Packager: PlanetLab Central <support@planet-lab.org>
7 Distribution: PlanetLab 3.0
8 URL: http://cvs.planet-lab.org/cvs/myplc
10 Summary: PlanetLab Central (PLC) Portable Installation
12 Version: %{releasever}.0
15 Group: Applications/Systems
16 Source0: %{name}-%{version}.tar.gz
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
19 %define debug_package %{nil}
22 MyPLC is a complete PlanetLab Central (PLC) portable installation
23 contained within a chroot jail. The default installation consists of a
24 web server, an XML-RPC API server, a boot server, and a database
25 server: the core components of PLC. The installation may be customized
26 through a graphical interface. All PLC services are started up and
27 shut down through a single System V init script installed in the host
35 ./build.sh -r %{releasever} -d %{_datadir}
37 # If run under sudo, allow user to delete the build directory
38 if [ -n "$SUDO_USER" ] ; then
40 # Some temporary chroot files like /var/empty/sshd and
41 # /usr/bin/sudo get created with non-readable permissions.
42 find . -not -perm +0600 -exec chmod u+rw {} \;
46 rm -rf $RPM_BUILD_ROOT
49 install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/plc/fc%{releasever}
50 install -D -m 644 fc%{releasever}.img $RPM_BUILD_ROOT/%{_datadir}/plc/fc%{releasever}.img
51 find data%{releasever} | cpio -p -d -u $RPM_BUILD_ROOT/%{_datadir}/plc/
52 install -D -m 755 host.init $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/plc
53 install -D -m 644 plc.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/plc
56 rm -rf $RPM_BUILD_ROOT
58 # If run under sudo, allow user to delete the built RPM
59 if [ -n "$SUDO_USER" ] ; then
60 chown $SUDO_USER %{_rpmdir}/%{_arch}/%{name}-%{version}-%{release}.%{_arch}.rpm
68 # 0 = erase, 1 = upgrade
69 if [ $1 -eq 0 ] ; then
75 %defattr(-,root,root,-)
76 %dir %{_datadir}/plc/fc%{releasever}
77 %{_datadir}/plc/fc%{releasever}.img
78 %{_datadir}/plc/data%{releasever}
79 %{_sysconfdir}/init.d/plc
80 %{_sysconfdir}/sysconfig/plc
83 * Fri Mar 17 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.1-1