- initial set of PlanetLab 3.0 packages
[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.41 2004/08/25 19:09:42 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 := :pserver:anon@build.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-planetlab.spec
69 ALL += kernel
70
71 #
72 # vnet
73 #
74
75 vnet-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
76 vnet-INITIAL := HEAD
77 vnet-TAG := HEAD
78 vnet-MODULE := vnet
79 vnet-SPEC := vnet/vnet.spec
80 vnet-RPMFLAGS := --define "kernelver $(shell rpmquery --queryformat '%{VERSION}-%{RELEASE}\n' --specfile SPECS/$(notdir $(kernel-SPEC)) | head -1)"
81 ALL += vnet
82
83 # Build kernel first so we can bootstrap off of its build
84 vnet: kernel
85
86 #
87 # vsh
88 #
89
90 vsh-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
91 vsh-INITIAL := HEAD
92 vsh-TAG := HEAD
93 vsh-MODULE := trampoline
94 vsh-SPEC := trampoline/vsh.spec
95 ALL += vsh
96
97 # Build kernel first so we can bootstrap off of its build
98 vsh: kernel
99
100 #
101 # util-vserver
102 #
103
104 util-vserver-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
105 util-vserver-INITIAL := HEAD
106 util-vserver-TAG := HEAD
107 util-vserver-MODULE := util-vserver
108 util-vserver-SPEC := util-vserver/util-vserver.spec
109 ALL += util-vserver
110
111 # Build kernel first so we can bootstrap off of its build
112 util-vserver: kernel
113
114 #
115 # lkcdutils
116 #
117
118 lkcdutils-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
119 lkcdutils-INITIAL := HEAD
120 lkcdutils-TAG := HEAD
121 lkcdutils-MODULE := lkcdutils
122 lkcdutils-SPEC := lkcdutils/spec/lkcdutils.spec
123 ALL += lkcdutils
124
125 # Build kernel first so we can bootstrap off of its build
126 lkcdutils: kernel
127
128 #
129 # yum
130 #
131
132 yum-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
133 yum-INITIAL := HEAD
134 yum-TAG := HEAD
135 yum-MODULE := yum
136 yum-SPEC := yum/yum.spec
137 ALL += yum
138
139 #
140 # ksymoops
141 #
142
143 ksymoops-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
144 ksymoops-INITIAL := ksymoops-2_4_9
145 ksymoops-TAG := HEAD
146 ksymoops-MODULE := ksymoops
147 ksymoops-SPEC := ksymoops/ksymoops.spec
148 ALL += ksymoops
149
150 #
151 # PlanetLabAccounts
152 #
153
154 PlanetLabAccounts-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
155 PlanetLabAccounts-INITIAL := HEAD
156 PlanetLabAccounts-TAG := HEAD
157 PlanetLabAccounts-MODULE := PlanetLabAccounts
158 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
159 ALL += PlanetLabAccounts
160
161 #
162 # NodeUpdate
163 #
164
165 NodeUpdate-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
166 NodeUpdate-INITIAL := HEAD
167 NodeUpdate-TAG := HEAD
168 NodeUpdate-MODULE := NodeUpdate
169 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
170 ALL += NodeUpdate
171
172 #
173 # PlanetLabConf
174 #
175
176 PlanetLabConf-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
177 PlanetLabConf-INITIAL := HEAD
178 PlanetLabConf-TAG := HEAD
179 PlanetLabConf-MODULE := PlanetLabConf
180 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
181 ALL += PlanetLabConf
182
183 #
184 # PlanetLabKeys
185 #
186
187 PlanetLabKeys-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
188 PlanetLabKeys-INITIAL := HEAD
189 PlanetLabKeys-TAG := HEAD
190 PlanetLabKeys-MODULE := PlanetLabKeys
191 PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.spec
192 ALL += PlanetLabKeys
193
194 #
195 # BWLimit
196 #
197
198 BWLimit-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
199 BWLimit-INITIAL := HEAD
200 BWLimit-TAG := HEAD
201 BWLimit-MODULE := BWLimit
202 BWLimit-SPEC := BWLimit/BWLimit.spec
203 ALL += BWLimit
204
205 #
206 # ipod
207 #
208
209 ipod-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
210 ipod-INITIAL := HEAD
211 ipod-TAG := HEAD
212 ipod-MODULE := ipod
213 ipod-SPEC := ipod/ipod.spec
214 ALL += ipod
215
216 #
217 # sudo
218 #
219
220 sudo-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
221 sudo-INITIAL := HEAD
222 sudo-TAG := HEAD
223 sudo-MODULE := sudo
224 sudo-SPEC := sudo/planetlab_sudo.spec
225 ALL += sudo
226
227 #
228 # pycurl
229 #
230
231 pycurl-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
232 pycurl-INITIAL := HEAD
233 pycurl-TAG := HEAD
234 pycurl-MODULE := pycurl
235 pycurl-SPEC := pycurl/pycurl.spec
236 ALL += pycurl
237
238 #
239 # BootServerRequest
240 #
241
242 BootServerRequest-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
243 BootServerRequest-INITIAL := HEAD
244 BootServerRequest-TAG := HEAD
245 BootServerRequest-MODULE := BootServerRequest
246 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
247 ALL += BootServerRequest
248
249 #
250 # PlanetLabID
251 #
252
253 PlanetLabID-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
254 PlanetLabID-INITIAL := HEAD
255 PlanetLabID-TAG := HEAD
256 PlanetLabID-MODULE := PlanetLabID
257 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
258 ALL += PlanetLabID
259
260 #
261 # Node Manager
262 #
263
264 sidewinder-CVSROOT := pup-sidewinder@cvs.planet-lab.org:/cvs
265 sidewinder-INITIAL := HEAD
266 sidewinder-TAG := HEAD
267 sidewinder-MODULE := sidewinder
268 sidewinder-SPEC := sidewinder/sidewinder.spec
269 ALL += sidewinder
270
271 #
272 # pl_sshd
273 #
274
275 pl_sshd-CVSROOT := pup-pl_sshd@cvs.planet-lab.org:/cvs
276 pl_sshd-INITIAL := HEAD
277 pl_sshd-TAG := HEAD
278 pl_sshd-MODULE := pl_sshd
279 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
280 ALL += pl_sshd
281
282 ifeq ($(findstring $(package),$(ALL)),)
283
284 # Build all packages
285 all: $(ALL)
286
287 # Recurse
288 $(ALL):
289         $(MAKE) package=$@
290
291 # Remove files generated by this package
292 $(foreach package,$(ALL),$(package)-clean): %-clean:
293         $(MAKE) package=$* clean
294
295 # Remove all generated files
296 clean:
297         rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
298
299 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
300
301 else
302
303 # Define variables for Makerules
304 CVSROOT := $($(package)-CVSROOT)
305 INITIAL := $($(package)-INITIAL)
306 TAG := $($(package)-TAG)
307 MODULE := $($(package)-MODULE)
308 SPEC := $($(package)-SPEC)
309 RPMFLAGS := $($(package)-RPMFLAGS)
310 CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)
311
312 include Makerules
313
314 endif