2 # PlanetLab RPM generation
4 # Copyright (c) 2003 The Trustees of Princeton University (Trustees).
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions are
11 # * Redistributions of source code must retain the above copyright
12 # notice, this list of conditions and the following disclaimer.
14 # * Redistributions in binary form must reproduce the above
15 # copyright notice, this list of conditions and the following
16 # disclaimer in the documentation and/or other materials provided
17 # with the distribution.
19 # * Neither the name of the copyright holder nor the names of its
20 # contributors may be used to endorse or promote products derived
21 # from this software without specific prior written permission.
23 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TRUSTEES OR
27 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 # $Id: Makefile,v 1.44 2004/09/18 19:49:42 mlh-pl_rpm Exp $
42 # CVSROOT: CVSROOT to use
43 # INITIAL: CVS tag to use for Source0 tarball
44 # TAG: CVS tag to patch to
45 # MODULE: CVS module name to use
46 # SPEC: RPM spec file template
47 # RPMBUILD: If not rpmbuild
48 # RPMFLAGS: Miscellaneous RPM flags
50 # ALL: default targets
52 # If INITIAL is different than TAG, PatchSets will be generated
53 # automatically with cvsps(1) to bring Source0 up to TAG. If TAG is
54 # HEAD, a %{date} variable will be defined in the generated spec
55 # file. If a Patch: tag in the spec file matches a generated PatchSet
56 # number, the name of the patch will be as specified. Otherwise, the
57 # name of the patch will be the PatchSet number. %patch tags in the
58 # spec file are generated automatically.
65 kernel-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
66 kernel-INITIAL := HEAD
68 kernel-MODULE := linux-2.6
69 kernel-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
76 vnet-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
80 vnet-SPEC := vnet/vnet.spec
81 vnet-RPMFLAGS := --define "kernelver $(shell rpmquery --queryformat '%{VERSION}-%{RELEASE}\n' --specfile SPECS/$(notdir $(kernel-SPEC)) | head -1)"
84 # Build kernel first so we can bootstrap off of its build
91 vsh-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
94 vsh-MODULE := trampoline
95 vsh-SPEC := trampoline/vsh.spec
98 # Build kernel first so we can bootstrap off of its build
105 util-vserver-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
106 util-vserver-INITIAL := HEAD
107 util-vserver-TAG := HEAD
108 util-vserver-MODULE := util-vserver
109 util-vserver-SPEC := util-vserver/util-vserver.spec
112 # Build kernel first so we can bootstrap off of its build
119 vserver-reference-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
120 vserver-reference-INITIAL := HEAD
121 vserver-reference-TAG := HEAD
122 vserver-reference-MODULE := vserver-reference
123 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
124 # Package must be built as root
125 vserver-reference-RPMBUILD := sudo rpmbuild
126 ALL += vserver-reference
132 lkcdutils-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
133 lkcdutils-INITIAL := HEAD
134 lkcdutils-TAG := HEAD
135 lkcdutils-MODULE := lkcdutils
136 lkcdutils-SPEC := lkcdutils/spec/lkcdutils.spec
139 # Build kernel first so we can bootstrap off of its build
146 yum-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
150 yum-SPEC := yum/yum.spec
157 ksymoops-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
158 ksymoops-INITIAL := ksymoops-2_4_9
160 ksymoops-MODULE := ksymoops
161 ksymoops-SPEC := ksymoops/ksymoops.spec
168 PlanetLabAccounts-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
169 PlanetLabAccounts-INITIAL := HEAD
170 PlanetLabAccounts-TAG := HEAD
171 PlanetLabAccounts-MODULE := PlanetLabAccounts
172 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
173 ALL += PlanetLabAccounts
179 NodeUpdate-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
180 NodeUpdate-INITIAL := HEAD
181 NodeUpdate-TAG := HEAD
182 NodeUpdate-MODULE := NodeUpdate
183 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
190 PlanetLabConf-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
191 PlanetLabConf-INITIAL := HEAD
192 PlanetLabConf-TAG := HEAD
193 PlanetLabConf-MODULE := PlanetLabConf
194 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
201 PlanetLabKeys-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
202 PlanetLabKeys-INITIAL := HEAD
203 PlanetLabKeys-TAG := HEAD
204 PlanetLabKeys-MODULE := PlanetLabKeys
205 PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.spec
212 BWLimit-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
213 BWLimit-INITIAL := HEAD
215 BWLimit-MODULE := BWLimit
216 BWLimit-SPEC := BWLimit/BWLimit.spec
223 ipod-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
227 ipod-SPEC := ipod/ipod.spec
234 sudo-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
238 sudo-SPEC := sudo/planetlab_sudo.spec
245 pycurl-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
246 pycurl-INITIAL := HEAD
248 pycurl-MODULE := pycurl
249 pycurl-SPEC := pycurl/pycurl.spec
256 BootServerRequest-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
257 BootServerRequest-INITIAL := HEAD
258 BootServerRequest-TAG := HEAD
259 BootServerRequest-MODULE := BootServerRequest
260 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
261 ALL += BootServerRequest
267 PlanetLabID-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
268 PlanetLabID-INITIAL := HEAD
269 PlanetLabID-TAG := HEAD
270 PlanetLabID-MODULE := PlanetLabID
271 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
278 sidewinder-CVSROOT := pup-sidewinder@cvs.planet-lab.org:/cvs
279 sidewinder-INITIAL := HEAD
280 sidewinder-TAG := HEAD
281 sidewinder-MODULE := sidewinder
282 sidewinder-SPEC := sidewinder/sidewinder.spec
289 pl_sshd-CVSROOT := pup-pl_sshd@cvs.planet-lab.org:/cvs
290 pl_sshd-INITIAL := HEAD
292 pl_sshd-MODULE := pl_sshd
293 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
296 ifeq ($(findstring $(package),$(ALL)),)
305 # Remove files generated by this package
306 $(foreach package,$(ALL),$(package)-clean): %-clean:
307 $(MAKE) package=$* clean
309 # Remove all generated files
311 rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
313 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
317 # Define variables for Makerules
318 CVSROOT := $($(package)-CVSROOT)
319 INITIAL := $($(package)-INITIAL)
320 TAG := $($(package)-TAG)
321 MODULE := $($(package)-MODULE)
322 SPEC := $($(package)-SPEC)
323 RPMFLAGS := $($(package)-RPMFLAGS)
324 RPMBUILD := $(if $($(package)-RPMBUILD),$($(package)-RPMBUILD),rpmbuild)
325 CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)