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
13 Release: 1%{?pldistro:.%{pldistro}}%{?date:.%{date}}
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}
38 # If run under sudo, allow user to delete the build directory
39 if [ -n "$SUDO_USER" ] ; then
41 # Some temporary chroot files like /var/empty/sshd and
42 # /usr/bin/sudo get created with non-readable permissions.
43 find . -not -perm +0600 -exec chmod u+rw {} \;
47 rm -rf $RPM_BUILD_ROOT
50 install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/plc/fc%{releasever}
51 install -D -m 644 fc%{releasever}.img $RPM_BUILD_ROOT/%{_datadir}/plc/fc%{releasever}.img
52 find data%{releasever} | cpio -p -d -u $RPM_BUILD_ROOT/%{_datadir}/plc/
53 install -D -m 755 host.init $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/plc
54 install -D -m 644 plc.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/plc
58 rm -rf $RPM_BUILD_ROOT
60 # If run under sudo, allow user to delete the built RPM
61 if [ -n "$SUDO_USER" ] ; then
62 chown $SUDO_USER %{_rpmdir}/%{_arch}/%{name}-%{version}-%{release}.%{_arch}.rpm
70 # 0 = erase, 1 = upgrade
71 if [ $1 -eq 0 ] ; then
77 %defattr(-,root,root,-)
78 %dir %{_datadir}/plc/fc%{releasever}
79 %{_datadir}/plc/fc%{releasever}.img
80 %{_datadir}/plc/data%{releasever}
81 %{_sysconfdir}/init.d/plc
82 %config(noreplace) %{_sysconfdir}/sysconfig/plc
85 * Fri Mar 17 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.1-1