- go back to using the pup pseudo-account for checking out. Eventually,
[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.36 2004/08/05 22:43:22 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 += v
136 perl-IO-Stty-SPEC := perl-IO-Stty/perl-IO-Stty.spec
137 ALL += perl-IO-Stty
138
139 #
140 # ipod
141 #
142
143 ipod-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
144 ipod-INITIAL := HEAD
145 ipod-TAG := HEAD
146 ipod-MODULE := ipod
147 ipod-SPEC := ipod/ipod.spec
148 ALL += ipod
149
150 #
151 # sudo
152 #
153
154 sudo-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
155 sudo-INITIAL := HEAD
156 sudo-TAG := HEAD
157 sudo-MODULE := sudo
158 sudo-SPEC := sudo/planetlab_sudo.spec
159 ALL += sudo
160
161 #
162 # blacklist
163 #
164
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
170 ALL += blacklist
171
172 #
173 # httpd
174 #
175
176 httpd-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
177 httpd-INITIAL := HEAD
178 httpd-TAG := HEAD
179 httpd-MODULE := httpd
180 httpd-SPEC := httpd/httpd.spec
181 ALL += httpd
182
183 #
184 # BootServerRequest
185 #
186
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
193
194 #
195 # PlanetLabID
196 #
197
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
203 ALL += PlanetLabID
204
205 #
206 # iputils
207 #
208
209 iputils-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
210 iputils-INITIAL := HEAD
211 iputils-TAG := HEAD
212 iputils-MODULE := iputils
213 iputils-SPEC := iputils/iputils.spec
214 ALL += iputils
215
216 #
217 # traceroute
218 #
219
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
225 ALL += traceroute
226
227 #
228 # net-tools
229 #
230
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
236 ALL += net-tools
237
238 #
239 # watchdog
240 #
241
242 watchdog-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
243 watchdog-INITIAL := watchdog-5_2
244 watchdog-TAG := HEAD
245 watchdog-MODULE := watchdog
246 watchdog-SPEC := watchdog/watchdog.spec
247 ALL += watchdog
248
249 #
250 # Node Manager
251 #
252
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
258 ALL += sidewinder
259
260 ifeq ($(findstring $(package),$(ALL)),)
261
262 # Build all packages
263 all: $(ALL)
264
265 # Recurse
266 $(ALL):
267         $(MAKE) package=$@
268
269 # Remove files generated by this package
270 $(foreach package,$(ALL),$(package)-clean): %-clean:
271         $(MAKE) package=$* clean
272
273 # Remove all generated files
274 clean:
275         rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
276
277 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
278
279 else
280
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)
289
290 include Makerules
291
292 endif