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