From 4467fd3bd5fe91974e7be22ddbd54bff6f6c7b31 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Mon, 21 Nov 2005 22:35:03 +0000 Subject: [PATCH] add bootcd_v3 to automated build --- bootcd.spec | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 bootcd.spec diff --git a/bootcd.spec b/bootcd.spec new file mode 100644 index 0000000..45c4f84 --- /dev/null +++ b/bootcd.spec @@ -0,0 +1,77 @@ +%define name bootcd +%define version 3.2 +%define release 1.planetlab%{?date:.%{date}} +# XXX Get this from /etc/planetlab +%define configuration default + +Vendor: PlanetLab +Packager: PlanetLab Central +Distribution: PlanetLab 3.2 +URL: http://cvs.planet-lab.org/cvs/bootcd_v3 + +Summary: The PlanetLab Boot CD +Name: bootcd +Version: %{version} +Release: %{release} +License: BSD +Group: System Environment/Base +Source0: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +AutoReqProv: no +%define debug_package %{nil} + +%description +The PlanetLab Boot CD securely boots PlanetLab nodes into an immutable +environment. + +%prep +%setup -q + +%build +./build.sh build %{configuration} + +%install +install -d $RPM_BUILD_ROOT/var/www/html/download +pushd build/%{configuration} +bzip2 -c PlanetLab-BootCD-%{version}.iso > \ + $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}.iso.bz2 +bzip2 -c PlanetLab-BootCD-%{version}.usb > \ + $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}.usb.bz2 +md5sum PlanetLab-BootCD-%{version}.{iso,usb} >> \ + $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}.md5 +cd $RPM_BUILD_ROOT/var/www/html/download/ +md5sum PlanetLab-BootCD-%{version}.{iso,usb}.bz2 >> \ + PlanetLab-BootCD-%{version}.md5 +popd + +# If run under sudo, allow user to delete the build directory +if [ -n "$SUDO_USER" ] ; then + chown -R $SUDO_USER . +fi + +%clean +rm -rf $RPM_BUILD_ROOT + +# If run under sudo, allow user to delete the built RPM +if [ -n "$SUDO_USER" ] ; then + chown $SUDO_USER %{_rpmdir}/%{_arch}/%{name}-%{version}-%{release}.%{_arch}.rpm +fi + +%post +cat < - +- Initial build. + -- 2.43.0