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.36 2004/08/05 22:43:22 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 ltt-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
109 ltt-SPEC := ltt/ltt.spec
116 lkcdutils-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
117 lkcdutils-INITIAL := lkcdutils-4_1
118 lkcdutils-TAG := HEAD
119 lkcdutils-MODULE := lkcdutils
120 lkcdutils-SPEC := lkcdutils/spec/lkcdutils.spec
123 # Build kernel first so we can bootstrap off of its build
130 vserver-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
131 vserver-INITIAL := vserver-0_29
133 vserver-MODULE := vserver
134 vserver-SPEC := vserver/vserver.spec
136 perl-IO-Stty-SPEC := perl-IO-Stty/perl-IO-Stty.spec
143 ipod-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
147 ipod-SPEC := ipod/ipod.spec
154 sudo-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
158 sudo-SPEC := sudo/planetlab_sudo.spec
165 blacklist-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
166 blacklist-INITIAL := HEAD
167 blacklist-TAG := HEAD
168 blacklist-MODULE := blacklist
169 blacklist-SPEC := blacklist/PlanetLab-blacklist.spec
176 httpd-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
177 httpd-INITIAL := HEAD
179 httpd-MODULE := httpd
180 httpd-SPEC := httpd/httpd.spec
187 BootServerRequest-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
188 BootServerRequest-INITIAL := HEAD
189 BootServerRequest-TAG := HEAD
190 BootServerRequest-MODULE := BootServerRequest
191 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
192 ALL += BootServerRequest
198 PlanetLabID-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
199 PlanetLabID-INITIAL := HEAD
200 PlanetLabID-TAG := HEAD
201 PlanetLabID-MODULE := PlanetLabID
202 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
209 iputils-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
210 iputils-INITIAL := HEAD
212 iputils-MODULE := iputils
213 iputils-SPEC := iputils/iputils.spec
220 traceroute-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
221 traceroute-INITIAL := HEAD
222 traceroute-TAG := HEAD
223 traceroute-MODULE := traceroute
224 traceroute-SPEC := traceroute/traceroute.spec
231 net-tools-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
232 net-tools-INITIAL := net-tools-1_60
233 net-tools-TAG := HEAD
234 net-tools-MODULE := net-tools
235 net-tools-SPEC := net-tools/RPM/net-tools.spec
242 watchdog-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
243 watchdog-INITIAL := watchdog-5_2
245 watchdog-MODULE := watchdog
246 watchdog-SPEC := watchdog/watchdog.spec
253 sidewinder-CVSROOT := pup-sidewinder@cvs.planet-lab.org:/cvs
254 sidewinder-INITIAL := HEAD
255 sidewinder-TAG := HEAD
256 sidewinder-MODULE := sidewinder
257 sidewinder-SPEC := sidewinder/sidewinder.spec
260 ifeq ($(findstring $(package),$(ALL)),)
269 # Remove files generated by this package
270 $(foreach package,$(ALL),$(package)-clean): %-clean:
271 $(MAKE) package=$* clean
273 # Remove all generated files
275 rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
277 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
281 # Define variables for Makerules
282 CVSROOT := $($(package)-CVSROOT)
283 INITIAL := $($(package)-INITIAL)
284 TAG := $($(package)-TAG)
285 MODULE := $($(package)-MODULE)
286 SPEC := $($(package)-SPEC)
287 RPMFLAGS := $($(package)-RPMFLAGS)
288 CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)