added BootServerRequest
[build.git] / Makefile
1 #
2 # PlanetLab RPM generation
3 #
4 # Copyright (c) 2003  The Trustees of Princeton University (Trustees).
5 # All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions are
9 # met: 
10
11 #     * Redistributions of source code must retain the above copyright
12 #       notice, this list of conditions and the following disclaimer.
13
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.
18
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.
22
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.
34 #
35 # $Id: Makefile,v 1.24 2004/04/13 22:16:32 mlh-pl_rpm Exp $
36 #
37
38 # Default target
39 all:
40
41 #
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
48 # CVS_RSH: If not ssh
49 # ALL: default targets
50 #
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.
58 #
59
60 #
61 # kernel
62 #
63
64 kernel-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
65 kernel-INITIAL := linux-2_4_22
66 kernel-TAG := HEAD
67 kernel-MODULE := linux-2.4
68 kernel-SPEC := linux-2.4/scripts/kernel-planetlab.spec
69 ALL += kernel
70
71 #
72 # plkmod
73 #
74
75 plkmod-CVSROOT := pup-silk@cvs.planet-lab.org:/cvs
76 plkmod-INITIAL := HEAD
77 plkmod-TAG := 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)"
81 ALL += plkmod
82
83 # Build kernel first so we can bootstrap off of its build
84 plkmod: kernel
85
86 #
87 # vdk
88 #
89
90 vdk-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
91 vdk-INITIAL := vdk_918
92 vdk-TAG := HEAD
93 vdk-MODULE := vdk
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)"
96 ALL += vdk
97
98 # Build kernel first so we can bootstrap off of its build
99 vdk: kernel
100
101 #
102 # lkcdutils
103 #
104
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
110 ALL += lkcdutils
111
112 # Build kernel first so we can bootstrap off of its build
113 lkcdutils: kernel
114
115 #
116 # vserver
117 #
118
119 vserver-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
120 vserver-INITIAL := vserver-0_29
121 vserver-TAG := HEAD
122 vserver-MODULE := vserver
123 vserver-SPEC := vserver/vserver.spec
124 ALL += vserver
125
126 #
127 # vserver-init
128 #
129
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
135 ALL += vserver-init
136
137 #
138 # vr-tools
139 #
140
141 vr-tools-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
142 vr-tools-INITIAL := HEAD
143 vr-tools-TAG := HEAD
144 vr-tools-MODULE := vr-tools
145 vr-tools-SPEC := vr-tools/vr-tools.spec
146 ALL += vr-tools
147
148 #
149 # vsh
150 #
151
152 vsh-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
153 vsh-INITIAL := bash-2_05
154 vsh-TAG := HEAD
155 vsh-MODULE := vsh
156 vsh-SPEC := vsh/vsh-planetlab.spec
157 ALL += vsh
158
159 # Build kernel first so we can bootstrap off of its build
160 vsh: kernel
161
162 #
163 # e2fsprogs
164 #
165
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
171 ALL += e2fsprogs
172
173 #
174 # initscripts
175 #
176
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
182 ALL += initscripts
183
184 #
185 # cq-tools
186 #
187
188 cq-tools-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
189 cq-tools-INITIAL := HEAD
190 cq-tools-TAG := HEAD
191 cq-tools-MODULE := cq-tools
192 cq-tools-SPEC := cq-tools/cq-tools.spec
193 ALL += cq-tools
194
195 #
196 # yum
197 #
198
199 yum-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
200 yum-INITIAL := YUM_2_0_3
201 yum-TAG := HEAD
202 yum-MODULE := yum
203 yum-SPEC := yum/yum.spec
204 ALL += yum
205
206 #
207 # ksymoops
208 #
209
210 ksymoops-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
211 ksymoops-INITIAL := ksymoops-2_4_9
212 ksymoops-TAG := HEAD
213 ksymoops-MODULE := ksymoops
214 ksymoops-SPEC := ksymoops/ksymoops.spec
215 ALL += ksymoops
216
217 #
218 # PlanetLabAccounts
219 #
220
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
227
228 #
229 # MAKEDEV
230 #
231
232 MAKEDEV-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
233 MAKEDEV-INITIAL := MAKEDEV_3_2_2
234 MAKEDEV-TAG := HEAD
235 MAKEDEV-MODULE := MAKEDEV
236 MAKEDEV-SPEC := MAKEDEV/MAKEDEV.spec
237 ALL += MAKEDEV
238
239 #
240 # NodeUpdate
241 #
242
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
248 ALL += NodeUpdate
249
250 #
251 # PlanetLabConf
252 #
253
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
259 ALL += PlanetLabConf
260
261 #
262 # PlanetLabKeys
263 #
264
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
270 ALL += PlanetLabKeys
271
272 #
273 # BWLimit
274 #
275
276 BWLimit-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
277 BWLimit-INITIAL := HEAD
278 BWLimit-TAG := HEAD
279 BWLimit-MODULE := BWLimit
280 BWLimit-SPEC := BWLimit/BWLimit.spec
281 ALL += BWLimit
282
283 #
284 # perl-IO-Stty
285 #
286
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
292 ALL += perl-IO-Stty
293
294 #
295 # ipod
296 #
297
298 ipod-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
299 ipod-INITIAL := HEAD
300 ipod-TAG := HEAD
301 ipod-MODULE := ipod
302 ipod-SPEC := ipod/ipod.spec
303 ALL += ipod
304
305 #
306 # sudo
307 #
308
309 sudo-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
310 sudo-INITIAL := HEAD
311 sudo-TAG := HEAD
312 sudo-MODULE := sudo
313 sudo-SPEC := sudo/planetlab_sudo.spec
314 ALL += sudo
315
316 #
317 # blacklist
318 #
319
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
325 ALL += blacklist
326
327 #
328 # httpd
329 #
330
331 httpd-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
332 httpd-INITIAL := HEAD
333 httpd-TAG := HEAD
334 httpd-MODULE := httpd
335 httpd-SPEC := httpd/httpd.spec
336 ALL += httpd
337
338 #
339 # BootServerRequest
340 #
341
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
348
349 ifeq ($(findstring $(package),$(ALL)),)
350
351 # Build all packages
352 all: $(ALL)
353
354 # Recurse
355 $(ALL):
356         $(MAKE) package=$@
357
358 # Remove files generated by this package
359 $(foreach package,$(ALL),$(package)-clean): %-clean:
360         $(MAKE) package=$* clean
361
362 # Remove all generated files
363 clean:
364         rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
365
366 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
367
368 else
369
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)
378
379 include Makerules
380
381 endif