- cvsps does the wrong thing after a vendor import update...it generates
[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.38 2004/08/13 18:19:04 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 # vserver-util
172 #
173
174 vserver-util-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
175 vserver-util-INITIAL := HEAD
176 vserver-util-TAG := HEAD
177 vserver-util-MODULE := vserver-util
178 vserver-util-SPEC := vserver-util/vserver-util-planetlab.spec
179 ALL += vserver-util
180
181 #
182 # vr-tools
183 #
184
185 vr-tools-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
186 vr-tools-INITIAL := HEAD
187 vr-tools-TAG := HEAD
188 vr-tools-MODULE := vr-tools
189 vr-tools-SPEC := vr-tools/vr-tools.spec
190 ALL += vr-tools
191
192 #
193 # vsh
194 #
195
196 vsh-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
197 vsh-INITIAL := bash-2_05
198 vsh-TAG := HEAD
199 vsh-MODULE := vsh
200 vsh-SPEC := vsh/vsh-planetlab.spec
201 ALL += vsh
202
203 # Build kernel first so we can bootstrap off of its build
204 vsh: kernel
205
206 #
207 # e2fsprogs
208 #
209
210 e2fsprogs-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
211 e2fsprogs-INITIAL := e2fsprogs-1_33
212 e2fsprogs-TAG := HEAD
213 e2fsprogs-MODULE := e2fsprogs
214 e2fsprogs-SPEC := e2fsprogs/e2fsprogs.spec
215 ALL += e2fsprogs
216
217 #
218 # initscripts
219 #
220
221 initscripts-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
222 initscripts-INITIAL := initscripts-7_14
223 initscripts-TAG := HEAD
224 initscripts-MODULE := initscripts
225 initscripts-SPEC := initscripts/initscripts.spec
226 ALL += initscripts
227
228 #
229 # cq-tools
230 #
231
232 cq-tools-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
233 cq-tools-INITIAL := HEAD
234 cq-tools-TAG := HEAD
235 cq-tools-MODULE := cq-tools
236 cq-tools-SPEC := cq-tools/cq-tools.spec
237 ALL += cq-tools
238
239 #
240 # yum
241 #
242
243 yum-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
244 yum-INITIAL := HEAD
245 yum-TAG := HEAD
246 yum-MODULE := yum
247 yum-SPEC := yum/yum.spec
248 ALL += yum
249
250 #
251 # ksymoops
252 #
253
254 ksymoops-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
255 ksymoops-INITIAL := ksymoops-2_4_9
256 ksymoops-TAG := HEAD
257 ksymoops-MODULE := ksymoops
258 ksymoops-SPEC := ksymoops/ksymoops.spec
259 ALL += ksymoops
260
261 #
262 # PlanetLabAccounts
263 #
264
265 PlanetLabAccounts-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
266 PlanetLabAccounts-INITIAL := HEAD
267 PlanetLabAccounts-TAG := HEAD
268 PlanetLabAccounts-MODULE := PlanetLabAccounts
269 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
270 ALL += PlanetLabAccounts
271
272 #
273 # MAKEDEV
274 #
275
276 MAKEDEV-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
277 MAKEDEV-INITIAL := MAKEDEV_3_2_2
278 MAKEDEV-TAG := HEAD
279 MAKEDEV-MODULE := MAKEDEV
280 MAKEDEV-SPEC := MAKEDEV/MAKEDEV.spec
281 ALL += MAKEDEV
282
283 #
284 # NodeUpdate
285 #
286
287 NodeUpdate-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
288 NodeUpdate-INITIAL := HEAD
289 NodeUpdate-TAG := HEAD
290 NodeUpdate-MODULE := NodeUpdate
291 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
292 ALL += NodeUpdate
293
294 #
295 # PlanetLabConf
296 #
297
298 PlanetLabConf-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
299 PlanetLabConf-INITIAL := HEAD
300 PlanetLabConf-TAG := HEAD
301 PlanetLabConf-MODULE := PlanetLabConf
302 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
303 ALL += PlanetLabConf
304
305 #
306 # PlanetLabKeys
307 #
308
309 PlanetLabKeys-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
310 PlanetLabKeys-INITIAL := HEAD
311 PlanetLabKeys-TAG := HEAD
312 PlanetLabKeys-MODULE := PlanetLabKeys
313 PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.spec
314 ALL += PlanetLabKeys
315
316 #
317 # BWLimit
318 #
319
320 BWLimit-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
321 BWLimit-INITIAL := HEAD
322 BWLimit-TAG := HEAD
323 BWLimit-MODULE := BWLimit
324 BWLimit-SPEC := BWLimit/BWLimit.spec
325 ALL += BWLimit
326
327 #
328 # perl-IO-Stty
329 #
330
331 perl-IO-Stty-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
332 perl-IO-Stty-INITIAL := PERL-IO-STTY_0_2
333 perl-IO-Stty-TAG := HEAD
334 perl-IO-Stty-MODULE := perl-IO-Stty
335 perl-IO-Stty-SPEC := perl-IO-Stty/perl-IO-Stty.spec
336 ALL += perl-IO-Stty
337
338 #
339 # ipod
340 #
341
342 ipod-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
343 ipod-INITIAL := HEAD
344 ipod-TAG := HEAD
345 ipod-MODULE := ipod
346 ipod-SPEC := ipod/ipod.spec
347 ALL += ipod
348
349 #
350 # sudo
351 #
352
353 sudo-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
354 sudo-INITIAL := HEAD
355 sudo-TAG := HEAD
356 sudo-MODULE := sudo
357 sudo-SPEC := sudo/planetlab_sudo.spec
358 ALL += sudo
359
360 #
361 # blacklist
362 #
363
364 blacklist-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
365 blacklist-INITIAL := HEAD
366 blacklist-TAG := HEAD
367 blacklist-MODULE := blacklist
368 blacklist-SPEC := blacklist/PlanetLab-blacklist.spec
369 ALL += blacklist
370
371 #
372 # httpd
373 #
374
375 httpd-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
376 httpd-INITIAL := HEAD
377 httpd-TAG := HEAD
378 httpd-MODULE := httpd
379 httpd-SPEC := httpd/httpd.spec
380 ALL += httpd
381
382 #
383 # BootServerRequest
384 #
385
386 BootServerRequest-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
387 BootServerRequest-INITIAL := HEAD
388 BootServerRequest-TAG := HEAD
389 BootServerRequest-MODULE := BootServerRequest
390 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
391 ALL += BootServerRequest
392
393 #
394 # PlanetLabID
395 #
396
397 PlanetLabID-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
398 PlanetLabID-INITIAL := HEAD
399 PlanetLabID-TAG := HEAD
400 PlanetLabID-MODULE := PlanetLabID
401 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
402 ALL += PlanetLabID
403
404 #
405 # iputils
406 #
407
408 iputils-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
409 iputils-INITIAL := HEAD
410 iputils-TAG := HEAD
411 iputils-MODULE := iputils
412 iputils-SPEC := iputils/iputils.spec
413 ALL += iputils
414
415 #
416 # traceroute
417 #
418
419 traceroute-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
420 traceroute-INITIAL := HEAD
421 traceroute-TAG := HEAD
422 traceroute-MODULE := traceroute
423 traceroute-SPEC := traceroute/traceroute.spec
424 ALL += traceroute
425
426 #
427 # net-tools
428 #
429
430 net-tools-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
431 net-tools-INITIAL := net-tools-1_60
432 net-tools-TAG := HEAD
433 net-tools-MODULE := net-tools
434 net-tools-SPEC := net-tools/RPM/net-tools.spec
435 ALL += net-tools
436
437 #
438 # watchdog
439 #
440
441 watchdog-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
442 watchdog-INITIAL := watchdog-5_2
443 watchdog-TAG := HEAD
444 watchdog-MODULE := watchdog
445 watchdog-SPEC := watchdog/watchdog.spec
446 ALL += watchdog
447
448 #
449 # Node Manager
450 #
451
452 sidewinder-CVSROOT := pup-sidewinder@cvs.planet-lab.org:/cvs
453 sidewinder-INITIAL := HEAD
454 sidewinder-TAG := HEAD
455 sidewinder-MODULE := sidewinder
456 sidewinder-SPEC := sidewinder/sidewinder.spec
457 ALL += sidewinder
458
459 ifeq ($(findstring $(package),$(ALL)),)
460
461 # Build all packages
462 all: $(ALL)
463
464 # Recurse
465 $(ALL):
466         $(MAKE) package=$@
467
468 # Remove files generated by this package
469 $(foreach package,$(ALL),$(package)-clean): %-clean:
470         $(MAKE) package=$* clean
471
472 # Remove all generated files
473 clean:
474         rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
475
476 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
477
478 else
479
480 # Define variables for Makerules
481 CVSROOT := $($(package)-CVSROOT)
482 INITIAL := $($(package)-INITIAL)
483 TAG := $($(package)-TAG)
484 MODULE := $($(package)-MODULE)
485 SPEC := $($(package)-SPEC)
486 RPMFLAGS := $($(package)-RPMFLAGS)
487 CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)
488
489 include Makerules
490
491 endif