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.41 2004/08/25 19:09: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 # RPMFLAGS: Miscellaneous RPM flags
49 # ALL: default targets
51 # If INITIAL is different than TAG, PatchSets will be generated
52 # automatically with cvsps(1) to bring Source0 up to TAG. If TAG is
53 # HEAD, a %{date} variable will be defined in the generated spec
54 # file. If a Patch: tag in the spec file matches a generated PatchSet
55 # number, the name of the patch will be as specified. Otherwise, the
56 # name of the patch will be the PatchSet number. %patch tags in the
57 # spec file are generated automatically.
64 kernel-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
65 kernel-INITIAL := HEAD
67 kernel-MODULE := linux-2.6
68 kernel-SPEC := linux-2.6/scripts/kernel-planetlab.spec
75 vnet-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
79 vnet-SPEC := vnet/vnet.spec
80 vnet-RPMFLAGS := --define "kernelver $(shell rpmquery --queryformat '%{VERSION}-%{RELEASE}\n' --specfile SPECS/$(notdir $(kernel-SPEC)) | head -1)"
83 # Build kernel first so we can bootstrap off of its build
90 vsh-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
93 vsh-MODULE := trampoline
94 vsh-SPEC := trampoline/vsh.spec
97 # Build kernel first so we can bootstrap off of its build
104 util-vserver-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
105 util-vserver-INITIAL := HEAD
106 util-vserver-TAG := HEAD
107 util-vserver-MODULE := util-vserver
108 util-vserver-SPEC := util-vserver/util-vserver.spec
111 # Build kernel first so we can bootstrap off of its build
118 lkcdutils-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
119 lkcdutils-INITIAL := HEAD
120 lkcdutils-TAG := HEAD
121 lkcdutils-MODULE := lkcdutils
122 lkcdutils-SPEC := lkcdutils/spec/lkcdutils.spec
125 # Build kernel first so we can bootstrap off of its build
132 yum-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
136 yum-SPEC := yum/yum.spec
143 ksymoops-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
144 ksymoops-INITIAL := ksymoops-2_4_9
146 ksymoops-MODULE := ksymoops
147 ksymoops-SPEC := ksymoops/ksymoops.spec
154 PlanetLabAccounts-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
155 PlanetLabAccounts-INITIAL := HEAD
156 PlanetLabAccounts-TAG := HEAD
157 PlanetLabAccounts-MODULE := PlanetLabAccounts
158 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
159 ALL += PlanetLabAccounts
165 NodeUpdate-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
166 NodeUpdate-INITIAL := HEAD
167 NodeUpdate-TAG := HEAD
168 NodeUpdate-MODULE := NodeUpdate
169 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
176 PlanetLabConf-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
177 PlanetLabConf-INITIAL := HEAD
178 PlanetLabConf-TAG := HEAD
179 PlanetLabConf-MODULE := PlanetLabConf
180 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
187 PlanetLabKeys-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
188 PlanetLabKeys-INITIAL := HEAD
189 PlanetLabKeys-TAG := HEAD
190 PlanetLabKeys-MODULE := PlanetLabKeys
191 PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.spec
198 BWLimit-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
199 BWLimit-INITIAL := HEAD
201 BWLimit-MODULE := BWLimit
202 BWLimit-SPEC := BWLimit/BWLimit.spec
209 ipod-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
213 ipod-SPEC := ipod/ipod.spec
220 sudo-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
224 sudo-SPEC := sudo/planetlab_sudo.spec
231 pycurl-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
232 pycurl-INITIAL := HEAD
234 pycurl-MODULE := pycurl
235 pycurl-SPEC := pycurl/pycurl.spec
242 BootServerRequest-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
243 BootServerRequest-INITIAL := HEAD
244 BootServerRequest-TAG := HEAD
245 BootServerRequest-MODULE := BootServerRequest
246 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
247 ALL += BootServerRequest
253 PlanetLabID-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
254 PlanetLabID-INITIAL := HEAD
255 PlanetLabID-TAG := HEAD
256 PlanetLabID-MODULE := PlanetLabID
257 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
264 sidewinder-CVSROOT := pup-sidewinder@cvs.planet-lab.org:/cvs
265 sidewinder-INITIAL := HEAD
266 sidewinder-TAG := HEAD
267 sidewinder-MODULE := sidewinder
268 sidewinder-SPEC := sidewinder/sidewinder.spec
275 pl_sshd-CVSROOT := pup-pl_sshd@cvs.planet-lab.org:/cvs
276 pl_sshd-INITIAL := HEAD
278 pl_sshd-MODULE := pl_sshd
279 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
282 ifeq ($(findstring $(package),$(ALL)),)
291 # Remove files generated by this package
292 $(foreach package,$(ALL),$(package)-clean): %-clean:
293 $(MAKE) package=$* clean
295 # Remove all generated files
297 rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
299 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
303 # Define variables for Makerules
304 CVSROOT := $($(package)-CVSROOT)
305 INITIAL := $($(package)-INITIAL)
306 TAG := $($(package)-TAG)
307 MODULE := $($(package)-MODULE)
308 SPEC := $($(package)-SPEC)
309 RPMFLAGS := $($(package)-RPMFLAGS)
310 CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)