cross-module change for multi-arch myplc
[bootstrapfs.git] / noderepo.spec
1 #
2 # $Id: bootstrapfs.spec 7668 2008-01-08 11:49:43Z thierry $
3 #
4 %define url $URL: svn+ssh://thierry@svn.planet-lab.org/svn/BootstrapFS/trunk/bootstrapfs.spec $
5
6 # build is expected to export the following rpm variables
7 # %{distroname}     : e.g. Fedora
8 # %{distrorelease}  : e.g. 8
9 # %{node_rpms_plus} : as a +++ separated list of rpms from the build dir
10
11 %define nodetype %{pldistro}-%{_arch}
12
13 %define name noderepo-%{nodetype}
14 %define version 0.1
15 %define taglevel 2
16
17 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
18
19 Vendor: PlanetLab
20 Packager: PlanetLab Central <support@planet-lab.org>
21 Distribution: PlanetLab %{plrelease}
22 URL: %(echo %{url} | cut -d ' ' -f 2)
23
24 Summary: The initial content of the yum repository for nodes
25 Name: %{name}
26 Version: %{version}
27 Release: %{release}
28 License: BSD
29 Group: System Environment/Base
30 Source0: %{name}-%{version}.tar.gz
31 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
32 # other archs must be able to install this
33 BuildArch: noarch
34
35 BuildRequires: rsync 
36 Requires: myplc
37
38 %define debug_package %{nil}
39
40 %description
41 This rpm contains all the rpms designed for running on a PlanetLab node
42 they come organized into a yum repository 
43
44 %prep
45 %setup -q
46
47 %build
48 echo nothing to do at build time for noderepo
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52
53 repo=%{nodetype}
54 install -d -m 755 $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo
55 rpms=$(echo %{node_rpms_plus} | sed -e 's,+++, ,g')
56 for rpm in $rpms; do rsync %{_topdir}/$rpm $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo/ ; done
57 ### yumgroups
58 install -D -m 644 %{_topdir}/RPMS/yumgroups.xml $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo
59 # do not do this yet, as plc.d/packages will do it anyway
60 #createrepo -g yumgroups.xml $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post
66 service plc start packages
67
68 %files
69 %defattr(-,root,root,-)
70 /var/www/html/install-rpms/%{nodetype}
71
72 %changelog
73 * Tue Mar 4 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> -
74 - Initial build.