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.24 2004/04/13 22:16:32 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 := pup-pl_kernel@cvs.planet-lab.org:/cvs
65 kernel-INITIAL := linux-2_4_22
67 kernel-MODULE := linux-2.4
68 kernel-SPEC := linux-2.4/scripts/kernel-planetlab.spec
75 plkmod-CVSROOT := pup-silk@cvs.planet-lab.org:/cvs
76 plkmod-INITIAL := HEAD
78 plkmod-MODULE := sys-v3
79 plkmod-SPEC := sys-v3/rpm/plkmod.spec
80 plkmod-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 vdk-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
91 vdk-INITIAL := vdk_918
94 vdk-SPEC := vdk/vtune_driver.spec
95 vdk-RPMFLAGS = --define "kernelver $(shell rpmquery --queryformat '%{VERSION}-%{RELEASE}\n' --specfile SPECS/$(notdir $(kernel-SPEC)) | head -1)"
98 # Build kernel first so we can bootstrap off of its build
105 lkcdutils-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
106 lkcdutils-INITIAL := lkcdutils-4_1
107 lkcdutils-TAG := HEAD
108 lkcdutils-MODULE := lkcdutils
109 lkcdutils-SPEC := lkcdutils/spec/lkcdutils.spec
112 # Build kernel first so we can bootstrap off of its build
119 vserver-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
120 vserver-INITIAL := vserver-0_29
122 vserver-MODULE := vserver
123 vserver-SPEC := vserver/vserver.spec
130 vserver-init-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
131 vserver-init-INITIAL := HEAD
132 vserver-init-TAG := HEAD
133 vserver-init-MODULE := vserver-init
134 vserver-init-SPEC := vserver-init/vserver-init.spec
141 vr-tools-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
142 vr-tools-INITIAL := HEAD
144 vr-tools-MODULE := vr-tools
145 vr-tools-SPEC := vr-tools/vr-tools.spec
152 vsh-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
153 vsh-INITIAL := bash-2_05
156 vsh-SPEC := vsh/vsh-planetlab.spec
159 # Build kernel first so we can bootstrap off of its build
166 e2fsprogs-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
167 e2fsprogs-INITIAL := e2fsprogs-1_33
168 e2fsprogs-TAG := HEAD
169 e2fsprogs-MODULE := e2fsprogs
170 e2fsprogs-SPEC := e2fsprogs/e2fsprogs.spec
177 initscripts-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
178 initscripts-INITIAL := initscripts-7_14
179 initscripts-TAG := HEAD
180 initscripts-MODULE := initscripts
181 initscripts-SPEC := initscripts/initscripts.spec
188 cq-tools-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
189 cq-tools-INITIAL := HEAD
191 cq-tools-MODULE := cq-tools
192 cq-tools-SPEC := cq-tools/cq-tools.spec
199 yum-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
200 yum-INITIAL := YUM_2_0_3
203 yum-SPEC := yum/yum.spec
210 ksymoops-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
211 ksymoops-INITIAL := ksymoops-2_4_9
213 ksymoops-MODULE := ksymoops
214 ksymoops-SPEC := ksymoops/ksymoops.spec
221 PlanetLabAccounts-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
222 PlanetLabAccounts-INITIAL := HEAD
223 PlanetLabAccounts-TAG := HEAD
224 PlanetLabAccounts-MODULE := PlanetLabAccounts
225 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
226 ALL += PlanetLabAccounts
232 MAKEDEV-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
233 MAKEDEV-INITIAL := MAKEDEV_3_2_2
235 MAKEDEV-MODULE := MAKEDEV
236 MAKEDEV-SPEC := MAKEDEV/MAKEDEV.spec
243 NodeUpdate-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
244 NodeUpdate-INITIAL := HEAD
245 NodeUpdate-TAG := HEAD
246 NodeUpdate-MODULE := NodeUpdate
247 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
254 PlanetLabConf-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
255 PlanetLabConf-INITIAL := HEAD
256 PlanetLabConf-TAG := HEAD
257 PlanetLabConf-MODULE := PlanetLabConf
258 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
265 PlanetLabKeys-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
266 PlanetLabKeys-INITIAL := HEAD
267 PlanetLabKeys-TAG := HEAD
268 PlanetLabKeys-MODULE := PlanetLabKeys
269 PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.spec
276 BWLimit-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
277 BWLimit-INITIAL := HEAD
279 BWLimit-MODULE := BWLimit
280 BWLimit-SPEC := BWLimit/BWLimit.spec
287 perl-IO-Stty-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
288 perl-IO-Stty-INITIAL := PERL-IO-STTY_0_2
289 perl-IO-Stty-TAG := HEAD
290 perl-IO-Stty-MODULE := perl-IO-Stty
291 perl-IO-Stty-SPEC := perl-IO-Stty/perl-IO-Stty.spec
298 ipod-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
302 ipod-SPEC := ipod/ipod.spec
309 sudo-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
313 sudo-SPEC := sudo/planetlab_sudo.spec
320 blacklist-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
321 blacklist-INITIAL := HEAD
322 blacklist-TAG := HEAD
323 blacklist-MODULE := blacklist
324 blacklist-SPEC := blacklist/PlanetLab-blacklist.spec
331 httpd-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
332 httpd-INITIAL := HEAD
334 httpd-MODULE := httpd
335 httpd-SPEC := httpd/httpd.spec
342 BootServerRequest-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
343 BootServerRequest-INITIAL := HEAD
344 BootServerRequest-TAG := HEAD
345 BootServerRequest-MODULE := BootServerRequest
346 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
347 ALL += BootServerRequest
349 ifeq ($(findstring $(package),$(ALL)),)
358 # Remove files generated by this package
359 $(foreach package,$(ALL),$(package)-clean): %-clean:
360 $(MAKE) package=$* clean
362 # Remove all generated files
364 rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
366 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
370 # Define variables for Makerules
371 CVSROOT := $($(package)-CVSROOT)
372 INITIAL := $($(package)-INITIAL)
373 TAG := $($(package)-TAG)
374 MODULE := $($(package)-MODULE)
375 SPEC := $($(package)-SPEC)
376 RPMFLAGS := $($(package)-RPMFLAGS)
377 CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)