- change server to cvs.planet-lab.org
[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.48 2004/10/05 14:58:49 mlhuang 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 # RPMBUILD: If not rpmbuild
48 # RPMFLAGS: Miscellaneous RPM flags
49 # CVS_RSH: If not ssh
50 # ALL: default targets
51 #
52 # If INITIAL is different than TAG, PatchSets will be generated
53 # automatically with cvsps(1) to bring Source0 up to TAG. If TAG is
54 # HEAD, a %{date} variable will be defined in the generated spec
55 # file. If a Patch: tag in the spec file matches a generated PatchSet
56 # number, the name of the patch will be as specified. Otherwise, the
57 # name of the patch will be the PatchSet number. %patch tags in the
58 # spec file are generated automatically.
59 #
60
61 #
62 # kernel
63 #
64
65 kernel-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
66 kernel-INITIAL := HEAD
67 kernel-TAG := HEAD
68 kernel-MODULE := linux-2.6
69 kernel-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
70 ALL += kernel
71
72 #
73 # vnet
74 #
75
76 vnet-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
77 vnet-INITIAL := HEAD
78 vnet-TAG := HEAD
79 vnet-MODULE := vnet
80 vnet-SPEC := vnet/vnet.spec
81 vnet-RPMFLAGS := --define "kernelver $(shell rpmquery --queryformat '%{VERSION}-%{RELEASE}\n' --specfile SPECS/$(notdir $(kernel-SPEC)) | head -1)"
82 ALL += vnet
83
84 # Build kernel first so we can bootstrap off of its build
85 vnet: kernel
86
87 #
88 # vsh
89 #
90
91 vsh-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
92 vsh-INITIAL := HEAD
93 vsh-TAG := HEAD
94 vsh-MODULE := trampoline
95 vsh-SPEC := trampoline/vsh.spec
96 ALL += vsh
97
98 # Build kernel first so we can bootstrap off of its build
99 vsh: kernel
100
101 #
102 # util-vserver
103 #
104
105 util-vserver-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
106 util-vserver-INITIAL := HEAD
107 util-vserver-TAG := HEAD
108 util-vserver-MODULE := util-vserver
109 util-vserver-SPEC := util-vserver/util-vserver.spec
110 ALL += util-vserver
111
112 # Build kernel first so we can bootstrap off of its build
113 util-vserver: kernel
114
115 #
116 # vserver-reference
117 #
118
119 vserver-reference-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
120 vserver-reference-INITIAL := HEAD
121 vserver-reference-TAG := HEAD
122 vserver-reference-MODULE := vserver-reference
123 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
124 ALL += vserver-reference
125
126 #
127 # lkcdutils
128 #
129
130 lkcdutils-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
131 lkcdutils-INITIAL := HEAD
132 lkcdutils-TAG := HEAD
133 lkcdutils-MODULE := lkcdutils
134 lkcdutils-SPEC := lkcdutils/spec/lkcdutils.spec
135 ALL += lkcdutils
136
137 # Build kernel first so we can bootstrap off of its build
138 lkcdutils: kernel
139
140 #
141 # yum
142 #
143
144 yum-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
145 yum-INITIAL := HEAD
146 yum-TAG := HEAD
147 yum-MODULE := yum
148 yum-SPEC := yum/yum.spec
149 ALL += yum
150
151 #
152 # ksymoops
153 #
154
155 ksymoops-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
156 ksymoops-INITIAL := ksymoops-2_4_9
157 ksymoops-TAG := HEAD
158 ksymoops-MODULE := ksymoops
159 ksymoops-SPEC := ksymoops/ksymoops.spec
160 ALL += ksymoops
161
162 #
163 # PlanetLabAccounts
164 #
165
166 PlanetLabAccounts-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
167 PlanetLabAccounts-INITIAL := HEAD
168 PlanetLabAccounts-TAG := HEAD
169 PlanetLabAccounts-MODULE := PlanetLabAccounts
170 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
171 ALL += PlanetLabAccounts
172
173 #
174 # NodeUpdate
175 #
176
177 NodeUpdate-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
178 NodeUpdate-INITIAL := HEAD
179 NodeUpdate-TAG := HEAD
180 NodeUpdate-MODULE := NodeUpdate
181 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
182 ALL += NodeUpdate
183
184 #
185 # PlanetLabConf
186 #
187
188 PlanetLabConf-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
189 PlanetLabConf-INITIAL := HEAD
190 PlanetLabConf-TAG := HEAD
191 PlanetLabConf-MODULE := PlanetLabConf
192 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
193 ALL += PlanetLabConf
194
195 #
196 # PlanetLabKeys
197 #
198
199 PlanetLabKeys-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
200 PlanetLabKeys-INITIAL := HEAD
201 PlanetLabKeys-TAG := HEAD
202 PlanetLabKeys-MODULE := PlanetLabKeys
203 PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.spec
204 ALL += PlanetLabKeys
205
206 #
207 # BWLimit
208 #
209
210 BWLimit-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
211 BWLimit-INITIAL := HEAD
212 BWLimit-TAG := HEAD
213 BWLimit-MODULE := BWLimit
214 BWLimit-SPEC := BWLimit/BWLimit.spec
215 ALL += BWLimit
216
217 #
218 # ipod
219 #
220
221 ipod-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
222 ipod-INITIAL := HEAD
223 ipod-TAG := HEAD
224 ipod-MODULE := ipod
225 ipod-SPEC := ipod/ipod.spec
226 ALL += ipod
227
228 #
229 # sudo
230 #
231
232 sudo-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
233 sudo-INITIAL := HEAD
234 sudo-TAG := HEAD
235 sudo-MODULE := sudo
236 sudo-SPEC := sudo/planetlab_sudo.spec
237 ALL += sudo
238
239 #
240 # pycurl
241 #
242
243 pycurl-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
244 pycurl-INITIAL := HEAD
245 pycurl-TAG := HEAD
246 pycurl-MODULE := pycurl
247 pycurl-SPEC := pycurl/pycurl.spec
248 ALL += pycurl
249
250 #
251 # BootServerRequest
252 #
253
254 BootServerRequest-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
255 BootServerRequest-INITIAL := HEAD
256 BootServerRequest-TAG := HEAD
257 BootServerRequest-MODULE := BootServerRequest
258 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
259 ALL += BootServerRequest
260
261 #
262 # PlanetLabID
263 #
264
265 PlanetLabID-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
266 PlanetLabID-INITIAL := HEAD
267 PlanetLabID-TAG := HEAD
268 PlanetLabID-MODULE := PlanetLabID
269 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
270 ALL += PlanetLabID
271
272 #
273 # Node Manager
274 #
275
276 sidewinder-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
277 sidewinder-INITIAL := HEAD
278 sidewinder-TAG := HEAD
279 sidewinder-MODULE := sidewinder
280 sidewinder-SPEC := sidewinder/sidewinder.spec
281 ALL += sidewinder
282
283 #
284 # pl_sshd
285 #
286
287 pl_sshd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
288 pl_sshd-INITIAL := HEAD
289 pl_sshd-TAG := HEAD
290 pl_sshd-MODULE := pl_sshd
291 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
292 ALL += pl_sshd
293
294 #
295 # ulogd
296 #
297
298 ulogd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
299 ulogd-INITIAL := HEAD
300 ulogd-TAG := HEAD
301 ulogd-MODULE := netflow/ulogd
302 ulogd-SPEC := netflow/ulogd/ulogd.spec
303 ALL += ulogd
304
305 #
306 # netflow and netsummary
307 #
308
309 netflow-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
310 netflow-INITIAL := HEAD
311 netflow-TAG := HEAD
312 netflow-MODULE := netflow netsummary
313 netflow-SPEC := netflow/netflow.spec
314 ALL += netflow
315
316 ifeq ($(findstring $(package),$(ALL)),)
317
318 # Build all packages
319 all: $(ALL)
320
321 # Recurse
322 $(ALL):
323         $(MAKE) package=$@
324
325 # Remove files generated by this package
326 $(foreach package,$(ALL),$(package)-clean): %-clean:
327         $(MAKE) package=$* clean
328
329 # Remove all generated files
330 clean:
331         rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
332
333 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
334
335 else
336
337 # Define variables for Makerules
338 CVSROOT := $($(package)-CVSROOT)
339 INITIAL := $($(package)-INITIAL)
340 TAG := $($(package)-TAG)
341 MODULE := $($(package)-MODULE)
342 SPEC := $($(package)-SPEC)
343 RPMFLAGS := $($(package)-RPMFLAGS)
344 RPMBUILD := $(if $($(package)-RPMBUILD),$($(package)-RPMBUILD),rpmbuild)
345 CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)
346
347 include Makerules
348
349 endif