2 Packager: PlanetLab Central <support@planet-lab.org>
3 Distribution: PlanetLab 4.0
4 URL: http://cvs.planet-lab.org/cvs/myplc
6 Summary: PlanetLab Central (PLC) Development Environment
9 Release: 3%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11 Group: Development/Tools
12 Source0: %{name}-%{version}.tar.gz
13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
16 %define debug_package %{nil}
19 This package installs a complete PlanetLab development environment
20 contained within a chroot jail. The default installation consists of
21 all the tools necessary to compile MyPLC.
32 rm -rf $RPM_BUILD_ROOT
36 # Install host startup script and configuration file
37 install -D -m 755 host.init $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/plc-devel
38 install -D -m 644 plc-devel.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/plc-devel
40 # Install root filesystem
41 install -d -m 755 $RPM_BUILD_ROOT/plc/devel/root
42 install -D -m 644 devel/root.img $RPM_BUILD_ROOT/plc/devel/root.img
44 # Install data directory
45 find devel/data | cpio -p -d -u $RPM_BUILD_ROOT/plc/
50 rm -rf $RPM_BUILD_ROOT
53 if [ -n "$SUDO_USER" ] ; then
54 # Allow user to delete the build directory
55 chown -h -R $SUDO_USER .
56 # Some temporary cdroot files like /var/empty/sshd and
57 # /usr/bin/sudo get created with non-readable permissions.
58 find . -not -perm +0600 -exec chmod u+rw {} \;
59 # Allow user to delete the built RPM(s)
60 chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
64 if [ -x %{_sysconfdir}/init.d/plc-devel ] ; then
65 %{_sysconfdir}/init.d/plc-devel stop
69 if [ -x /sbin/chkconfig ] ; then
70 /sbin/chkconfig --add plc-devel
71 /sbin/chkconfig plc-devel on
75 # 0 = erase, 1 = upgrade
76 if [ $1 -eq 0 ] ; then
77 %{_sysconfdir}/init.d/plc-devel stop
78 if [ -x /sbin/chkconfig ] ; then
79 /sbin/chkconfig plc-devel off
80 /sbin/chkconfig --del plc-devel
85 %defattr(-,root,root,-)
86 # Host startup script and configuration file
87 %{_sysconfdir}/init.d/plc-devel
88 %{_sysconfdir}/sysconfig/plc-devel
96 %config(noreplace) /plc/devel/data/*
99 * Fri Jan 19 2007 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.5-3