- add proper to build
[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.51 2004/10/11 21:19:45 mef 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 # util-vserver
89 #
90
91 util-vserver-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
92 util-vserver-INITIAL := HEAD
93 util-vserver-TAG := HEAD
94 util-vserver-MODULE := util-vserver
95 util-vserver-SPEC := util-vserver/util-vserver.spec
96 ALL += util-vserver
97
98 # Build kernel first so we can bootstrap off of its build
99 util-vserver: kernel
100
101 #
102 # vserver-reference
103 #
104
105 vserver-reference-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
106 vserver-reference-INITIAL := HEAD
107 vserver-reference-TAG := HEAD
108 vserver-reference-MODULE := vserver-reference
109 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
110 ALL += vserver-reference
111
112 #
113 # lkcdutils
114 #
115
116 lkcdutils-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
117 lkcdutils-INITIAL := HEAD
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 # yum
128 #
129
130 yum-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
131 yum-INITIAL := HEAD
132 yum-TAG := HEAD
133 yum-MODULE := yum
134 yum-SPEC := yum/yum.spec
135 ALL += yum
136
137 #
138 # ksymoops
139 #
140
141 ksymoops-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
142 ksymoops-INITIAL := ksymoops-2_4_9
143 ksymoops-TAG := HEAD
144 ksymoops-MODULE := ksymoops
145 ksymoops-SPEC := ksymoops/ksymoops.spec
146 ALL += ksymoops
147
148 #
149 # PlanetLabAccounts
150 #
151
152 PlanetLabAccounts-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
153 PlanetLabAccounts-INITIAL := HEAD
154 PlanetLabAccounts-TAG := HEAD
155 PlanetLabAccounts-MODULE := PlanetLabAccounts
156 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
157 ALL += PlanetLabAccounts
158
159 #
160 # NodeUpdate
161 #
162
163 NodeUpdate-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
164 NodeUpdate-INITIAL := HEAD
165 NodeUpdate-TAG := HEAD
166 NodeUpdate-MODULE := NodeUpdate
167 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
168 ALL += NodeUpdate
169
170 #
171 # PlanetLabConf
172 #
173
174 PlanetLabConf-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
175 PlanetLabConf-INITIAL := HEAD
176 PlanetLabConf-TAG := HEAD
177 PlanetLabConf-MODULE := PlanetLabConf
178 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
179 ALL += PlanetLabConf
180
181 #
182 # PlanetLabKeys
183 #
184
185 PlanetLabKeys-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
186 PlanetLabKeys-INITIAL := HEAD
187 PlanetLabKeys-TAG := HEAD
188 PlanetLabKeys-MODULE := PlanetLabKeys
189 PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.spec
190 ALL += PlanetLabKeys
191
192 #
193 # BWLimit
194 #
195
196 BWLimit-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
197 BWLimit-INITIAL := HEAD
198 BWLimit-TAG := HEAD
199 BWLimit-MODULE := BWLimit
200 BWLimit-SPEC := BWLimit/BWLimit.spec
201 ALL += BWLimit
202
203 #
204 # ipod
205 #
206
207 ipod-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
208 ipod-INITIAL := HEAD
209 ipod-TAG := HEAD
210 ipod-MODULE := ipod
211 ipod-SPEC := ipod/ipod.spec
212 ALL += ipod
213
214 #
215 # sudo
216 #
217
218 sudo-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
219 sudo-INITIAL := HEAD
220 sudo-TAG := HEAD
221 sudo-MODULE := sudo
222 sudo-SPEC := sudo/planetlab_sudo.spec
223 ALL += sudo
224
225 #
226 # pycurl
227 #
228
229 pycurl-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
230 pycurl-INITIAL := HEAD
231 pycurl-TAG := HEAD
232 pycurl-MODULE := pycurl
233 pycurl-SPEC := pycurl/pycurl.spec
234 ALL += pycurl
235
236 #
237 # BootServerRequest
238 #
239
240 BootServerRequest-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
241 BootServerRequest-INITIAL := HEAD
242 BootServerRequest-TAG := HEAD
243 BootServerRequest-MODULE := BootServerRequest
244 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
245 ALL += BootServerRequest
246
247 #
248 # PlanetLabID
249 #
250
251 PlanetLabID-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
252 PlanetLabID-INITIAL := HEAD
253 PlanetLabID-TAG := HEAD
254 PlanetLabID-MODULE := PlanetLabID
255 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
256 ALL += PlanetLabID
257
258 #
259 # Node Manager
260 #
261
262 sidewinder-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
263 sidewinder-INITIAL := HEAD
264 sidewinder-TAG := HEAD
265 sidewinder-MODULE := sidewinder
266 sidewinder-SPEC := sidewinder/sidewinder.spec
267 ALL += sidewinder
268
269 #
270 # pl_sshd
271 #
272
273 pl_sshd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
274 pl_sshd-INITIAL := HEAD
275 pl_sshd-TAG := HEAD
276 pl_sshd-MODULE := pl_sshd
277 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
278 ALL += pl_sshd
279
280 #
281 # Resource Management Tools
282 #
283
284 resman-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
285 resman-INITIAL := HEAD
286 resman-TAG := HEAD
287 resman-MODULE := resman
288 resman-SPEC := resman/resman.spec
289 ALL += resman
290
291 #
292 # Proper: Privileged Operations Service
293 #
294
295 proper-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
296 proper-INITIAL := HEAD
297 proper-TAG := HEAD
298 proper-MODULE := proper
299 proper-SPEC := proper/proper.spec
300 ALL += proper
301
302 #
303 # ulogd
304 #
305
306 ulogd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
307 ulogd-INITIAL := HEAD
308 ulogd-TAG := HEAD
309 ulogd-MODULE := ulogd
310 ulogd-SPEC := ulogd/ulogd.spec
311 ALL += ulogd
312
313 ulogd: kernel proper
314
315 #
316 # netflow and netsummary
317 #
318
319 netflow-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
320 netflow-INITIAL := HEAD
321 netflow-TAG := HEAD
322 netflow-MODULE := netflow netsummary
323 netflow-SPEC := netflow/netflow.spec
324 ALL += netflow
325
326 ifeq ($(findstring $(package),$(ALL)),)
327
328 # Build all packages
329 all: $(ALL)
330
331 # Recurse
332 $(ALL):
333         $(MAKE) package=$@
334
335 # Remove files generated by this package
336 $(foreach package,$(ALL),$(package)-clean): %-clean:
337         $(MAKE) package=$* clean
338
339 # Remove all generated files
340 clean:
341         rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
342
343 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
344
345 else
346
347 # Define variables for Makerules
348 CVSROOT := $($(package)-CVSROOT)
349 INITIAL := $($(package)-INITIAL)
350 TAG := $($(package)-TAG)
351 MODULE := $($(package)-MODULE)
352 SPEC := $($(package)-SPEC)
353 RPMFLAGS := $($(package)-RPMFLAGS)
354 RPMBUILD := $(if $($(package)-RPMBUILD),$($(package)-RPMBUILD),rpmbuild)
355 CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)
356
357 include Makerules
358
359 endif