a43e01e0a00f1ddb5d2fb737dbc7e2f17f815ca3
[bootstrapfs.git] / bootstrapfs.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define name bootstrapfs
7 %define version 0.1
8 %define taglevel 2
9
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11
12 Vendor: PlanetLab
13 Packager: PlanetLab Central <support@planet-lab.org>
14 Distribution: PlanetLab %{plrelease}
15 URL: %(echo %{url} | cut -d ' ' -f 2)
16
17 Summary: The PlanetLab Bootstrap Filesystems
18 Name: %{name}
19 Version: %{version}
20 Release: %{release}
21 License: BSD
22 Group: System Environment/Base
23 Source0: %{name}-%{version}.tar.gz
24 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
25
26 Requires: tar, gnupg, sharutils, bzip2
27
28 AutoReqProv: no
29 %define debug_package %{nil}
30
31 %description
32
33 The PlanetLab Bootstrap Filesystem(s) are downloaded by the
34 BootManager to instantiate a node with a new filesystem.
35
36 %prep
37 %setup -q
38
39 %build
40 pushd BootstrapFS
41 ./build.sh %{pldistro}
42 popd BootstrapFS
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46
47 pushd BootstrapFS
48
49 install -D -m 644 PlanetLab-Bootstrap.tar.bz2 \
50         $RPM_BUILD_ROOT/var/www/html/boot/PlanetLab-Bootstrap.tar.bz2
51
52 for pkgs in $(ls ../build/config.%{pldistro}/bootstrapfs-*.pkgs) ; do 
53     NAME=$(basename $pkgs .pkgs | sed -e s,bootstrapfs-,,)
54     install -D -m 644 %{pldistro}-filesystems/PlanetLab-Bootstrap-${NAME}.tar.bz2 \
55                 $RPM_BUILD_ROOT/var/www/html/boot/PlanetLab-Bootstrap-${NAME}.tar.bz2
56 done
57
58 popd
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 # If run under sudo
64 if [ -n "$SUDO_USER" ] ; then
65     # Allow user to delete the build directory
66     chown -h -R $SUDO_USER .
67     # Some temporary cdroot files like /var/empty/sshd and
68     # /usr/bin/sudo get created with non-readable permissions.
69     find . -not -perm +0600 -exec chmod u+rw {} \;
70     # Allow user to delete the built RPM(s)
71     chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
72 fi
73
74 %post
75
76
77 %files
78 %defattr(-,root,root,-)
79 /var/www/html/boot/PlanetLab-Bootstrap*.tar.bz2
80
81 %changelog
82 * Fri Jan 18 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-0.1-1 bootstrapfs-0.1-2
83 - search more carefully for alternate pkgs files
84 - handling of sysconfig/crontab and creation of site_admin reviewed
85 - (this tag is set with module-tag.py)
86
87 * Fri Sep  2 2005 Mark Huang <mlhuang@cotton.CS.Princeton.EDU> - 
88 - Initial build.