- add vserver-quota
[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.28 2004/04/16 19:12:48 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 # ltt
103 #
104
105 ltt-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
106 ltt-INITIAL := HEAD
107 ltt-TAG := HEAD
108 ltt-MODULE := ltt
109 ltt-SPEC := ltt/ltt.spec
110 ALL += ltt
111
112 #
113 # lkcdutils
114 #
115
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
121 ALL += lkcdutils
122
123 # Build kernel first so we can bootstrap off of its build
124 lkcdutils: kernel
125
126 #
127 # vserver
128 #
129
130 vserver-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
131 vserver-INITIAL := vserver-0_29
132 vserver-TAG := HEAD
133 vserver-MODULE := vserver
134 vserver-SPEC := vserver/vserver.spec
135 ALL += vserver
136
137 #
138 # vserver-init
139 #
140
141 vserver-init-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
142 vserver-init-INITIAL := HEAD
143 vserver-init-TAG := HEAD
144 vserver-init-MODULE := vserver-init
145 vserver-init-SPEC := vserver-init/vserver-init.spec
146 ALL += vserver-init
147
148 #
149 # vserver-cache
150 #
151
152 vserver-cache-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
153 vserver-cache-INITIAL := HEAD
154 vserver-cache-TAG := HEAD
155 vserver-cache-MODULE := vserver-cache
156 vserver-cache-SPEC := vserver-cache/vserver-cache.spec
157 ALL += vserver-cache
158
159 #
160 # vserver-quota
161 #
162
163 vserver-quota-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
164 vserver-quota-INITIAL := HEAD
165 vserver-quota-TAG := HEAD
166 vserver-quota-MODULE := vserver-quota
167 vserver-quota-SPEC := vserver-quota/vserver-quota.spec
168 ALL += vserver-quota
169
170 #
171 # vr-tools
172 #
173
174 vr-tools-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
175 vr-tools-INITIAL := HEAD
176 vr-tools-TAG := HEAD
177 vr-tools-MODULE := vr-tools
178 vr-tools-SPEC := vr-tools/vr-tools.spec
179 ALL += vr-tools
180
181 #
182 # vsh
183 #
184
185 vsh-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
186 vsh-INITIAL := bash-2_05
187 vsh-TAG := HEAD
188 vsh-MODULE := vsh
189 vsh-SPEC := vsh/vsh-planetlab.spec
190 ALL += vsh
191
192 # Build kernel first so we can bootstrap off of its build
193 vsh: kernel
194
195 #
196 # e2fsprogs
197 #
198
199 e2fsprogs-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
200 e2fsprogs-INITIAL := e2fsprogs-1_33
201 e2fsprogs-TAG := HEAD
202 e2fsprogs-MODULE := e2fsprogs
203 e2fsprogs-SPEC := e2fsprogs/e2fsprogs.spec
204 ALL += e2fsprogs
205
206 #
207 # initscripts
208 #
209
210 initscripts-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
211 initscripts-INITIAL := initscripts-7_14
212 initscripts-TAG := HEAD
213 initscripts-MODULE := initscripts
214 initscripts-SPEC := initscripts/initscripts.spec
215 ALL += initscripts
216
217 #
218 # cq-tools
219 #
220
221 cq-tools-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
222 cq-tools-INITIAL := HEAD
223 cq-tools-TAG := HEAD
224 cq-tools-MODULE := cq-tools
225 cq-tools-SPEC := cq-tools/cq-tools.spec
226 ALL += cq-tools
227
228 #
229 # yum
230 #
231
232 yum-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
233 yum-INITIAL := YUM_2_0_3
234 yum-TAG := HEAD
235 yum-MODULE := yum
236 yum-SPEC := yum/yum.spec
237 ALL += yum
238
239 #
240 # ksymoops
241 #
242
243 ksymoops-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
244 ksymoops-INITIAL := ksymoops-2_4_9
245 ksymoops-TAG := HEAD
246 ksymoops-MODULE := ksymoops
247 ksymoops-SPEC := ksymoops/ksymoops.spec
248 ALL += ksymoops
249
250 #
251 # PlanetLabAccounts
252 #
253
254 PlanetLabAccounts-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
255 PlanetLabAccounts-INITIAL := HEAD
256 PlanetLabAccounts-TAG := HEAD
257 PlanetLabAccounts-MODULE := PlanetLabAccounts
258 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
259 ALL += PlanetLabAccounts
260
261 #
262 # MAKEDEV
263 #
264
265 MAKEDEV-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
266 MAKEDEV-INITIAL := MAKEDEV_3_2_2
267 MAKEDEV-TAG := HEAD
268 MAKEDEV-MODULE := MAKEDEV
269 MAKEDEV-SPEC := MAKEDEV/MAKEDEV.spec
270 ALL += MAKEDEV
271
272 #
273 # NodeUpdate
274 #
275
276 NodeUpdate-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
277 NodeUpdate-INITIAL := HEAD
278 NodeUpdate-TAG := HEAD
279 NodeUpdate-MODULE := NodeUpdate
280 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
281 ALL += NodeUpdate
282
283 #
284 # PlanetLabConf
285 #
286
287 PlanetLabConf-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
288 PlanetLabConf-INITIAL := HEAD
289 PlanetLabConf-TAG := HEAD
290 PlanetLabConf-MODULE := PlanetLabConf
291 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
292 ALL += PlanetLabConf
293
294 #
295 # PlanetLabKeys
296 #
297
298 PlanetLabKeys-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
299 PlanetLabKeys-INITIAL := HEAD
300 PlanetLabKeys-TAG := HEAD
301 PlanetLabKeys-MODULE := PlanetLabKeys
302 PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.spec
303 ALL += PlanetLabKeys
304
305 #
306 # BWLimit
307 #
308
309 BWLimit-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
310 BWLimit-INITIAL := HEAD
311 BWLimit-TAG := HEAD
312 BWLimit-MODULE := BWLimit
313 BWLimit-SPEC := BWLimit/BWLimit.spec
314 ALL += BWLimit
315
316 #
317 # perl-IO-Stty
318 #
319
320 perl-IO-Stty-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
321 perl-IO-Stty-INITIAL := PERL-IO-STTY_0_2
322 perl-IO-Stty-TAG := HEAD
323 perl-IO-Stty-MODULE := perl-IO-Stty
324 perl-IO-Stty-SPEC := perl-IO-Stty/perl-IO-Stty.spec
325 ALL += perl-IO-Stty
326
327 #
328 # ipod
329 #
330
331 ipod-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
332 ipod-INITIAL := HEAD
333 ipod-TAG := HEAD
334 ipod-MODULE := ipod
335 ipod-SPEC := ipod/ipod.spec
336 ALL += ipod
337
338 #
339 # sudo
340 #
341
342 sudo-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
343 sudo-INITIAL := HEAD
344 sudo-TAG := HEAD
345 sudo-MODULE := sudo
346 sudo-SPEC := sudo/planetlab_sudo.spec
347 ALL += sudo
348
349 #
350 # blacklist
351 #
352
353 blacklist-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
354 blacklist-INITIAL := HEAD
355 blacklist-TAG := HEAD
356 blacklist-MODULE := blacklist
357 blacklist-SPEC := blacklist/PlanetLab-blacklist.spec
358 ALL += blacklist
359
360 #
361 # httpd
362 #
363
364 httpd-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
365 httpd-INITIAL := HEAD
366 httpd-TAG := HEAD
367 httpd-MODULE := httpd
368 httpd-SPEC := httpd/httpd.spec
369 ALL += httpd
370
371 #
372 # BootServerRequest
373 #
374
375 BootServerRequest-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
376 BootServerRequest-INITIAL := HEAD
377 BootServerRequest-TAG := HEAD
378 BootServerRequest-MODULE := BootServerRequest
379 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
380 ALL += BootServerRequest
381
382 #
383 # PlanetLabID
384 #
385
386 PlanetLabID-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
387 PlanetLabID-INITIAL := HEAD
388 PlanetLabID-TAG := HEAD
389 PlanetLabID-MODULE := PlanetLabID
390 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
391 ALL += PlanetLabID
392
393 ifeq ($(findstring $(package),$(ALL)),)
394
395 # Build all packages
396 all: $(ALL)
397
398 # Recurse
399 $(ALL):
400         $(MAKE) package=$@
401
402 # Remove files generated by this package
403 $(foreach package,$(ALL),$(package)-clean): %-clean:
404         $(MAKE) package=$* clean
405
406 # Remove all generated files
407 clean:
408         rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
409
410 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
411
412 else
413
414 # Define variables for Makerules
415 CVSROOT := $($(package)-CVSROOT)
416 INITIAL := $($(package)-INITIAL)
417 TAG := $($(package)-TAG)
418 MODULE := $($(package)-MODULE)
419 SPEC := $($(package)-SPEC)
420 RPMFLAGS := $($(package)-RPMFLAGS)
421 CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)
422
423 include Makerules
424
425 endif