Merge branch 'master' of ssh://git.planet-lab.org/git/build
[build.git] / planetlab.mk
1 # $Id$
2 # $URL$
3 #
4 # declare the packages to be built and their dependencies
5 # initial version from Mark Huang
6 # Mark Huang <mlhuang@cs.princeton.edu>
7 # Copyright (C) 2003-2006 The Trustees of Princeton University
8 # rewritten by Thierry Parmentelat - INRIA Sophia Antipolis
9 #
10 # see doc in Makefile  
11 #
12
13 #
14 # kernel
15 #
16 # use a package name with srpm in it:
17 # so the source rpm is created by running make srpm in the codebase
18 #
19
20 kernel-MODULES := linux-2.6
21 kernel-SPEC := kernel-2.6.spec
22 kernel-BUILD-FROM-SRPM := yes
23 ifeq "$(HOSTARCH)" "i386"
24 kernel-RPMFLAGS:= --target i686
25 else
26 kernel-RPMFLAGS:= --target $(HOSTARCH)
27 endif
28 KERNELS += kernel
29
30 kernels: $(KERNELS)
31 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
32
33 ALL += $(KERNELS)
34 # this is to mark on which image a given rpm is supposed to go
35 IN_BOOTCD += $(KERNELS)
36 IN_VSERVER += $(KERNELS)
37 IN_BOOTSTRAPFS += $(KERNELS)
38 # turns out myplc installs kernel-vserver
39 IN_MYPLC += $(KERNELS)
40
41 #
42 # madwifi
43 #
44 madwifi-MODULES := madwifi
45 madwifi-SPEC := madwifi.spec
46 madwifi-BUILD-FROM-SRPM := yes
47 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
48 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
49         kernel_release=$(kernel.rpm-release) \
50         kernel_arch=$(kernel.rpm-arch)
51 ALL += madwifi
52 IN_BOOTSTRAPFS += madwifi
53
54 #
55 # util-vserver
56 #
57 util-vserver-MODULES := util-vserver
58 util-vserver-SPEC := util-vserver.spec
59 util-vserver-RPMFLAGS:= --without dietlibc
60 ALL += util-vserver
61 IN_BOOTSTRAPFS += util-vserver
62
63 #
64 # libnl - local import
65 # we need either 1.1 or at least 1.0.pre6
66 # rebuild this on centos5 - see kexcludes in build.common
67 #
68 local_libnl=false
69 ifeq "$(DISTRONAME)" "centos5"
70 local_libnl=true
71 endif
72
73 ifeq "$(local_libnl)" "true"
74 libnl-MODULES := libnl
75 libnl-SPEC := libnl.spec
76 libnl-BUILD-FROM-SRPM := yes
77 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
78 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
79 ALL += libnl
80 IN_BOOTSTRAPFS += libnl
81 endif
82
83 #
84 # util-vserver-pl
85 #
86 util-vserver-pl-MODULES := util-vserver-pl
87 util-vserver-pl-SPEC := util-vserver-pl.spec
88 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core 
89 ifeq "$(local_libnl)" "true"
90 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
91 endif
92 ALL += util-vserver-pl
93 IN_BOOTSTRAPFS += util-vserver-pl
94
95 #
96 # NodeUpdate
97 #
98 nodeupdate-MODULES := nodeupdate
99 nodeupdate-SPEC := NodeUpdate.spec
100 ALL += nodeupdate
101 IN_BOOTSTRAPFS += nodeupdate
102
103 #
104 # ipod
105 #
106 ipod-MODULES := PingOfDeath
107 ipod-SPEC := ipod.spec
108 ALL += ipod
109 IN_BOOTSTRAPFS += ipod
110
111 #
112 # NodeManager
113 #
114 nodemanager-MODULES := nodemanager
115 nodemanager-SPEC := NodeManager.spec
116 ALL += nodemanager
117 IN_BOOTSTRAPFS += nodemanager
118
119 #
120 # pl_sshd
121 #
122 sshd-MODULES := pl_sshd
123 sshd-SPEC := pl_sshd.spec
124 ALL += sshd
125 IN_BOOTSTRAPFS += sshd
126
127 #
128 # codemux: Port 80 demux
129 #
130 codemux-MODULES := codemux
131 codemux-SPEC   := codemux.spec
132 codemux-RPMBUILD := sudo bash ./rpmbuild.sh
133 ALL += codemux
134 IN_BOOTSTRAPFS += codemux
135
136 #
137 # fprobe-ulog
138 #
139 fprobe-ulog-MODULES := fprobe-ulog
140 fprobe-ulog-SPEC := fprobe-ulog.spec
141 ALL += fprobe-ulog
142 IN_BOOTSTRAPFS += fprobe-ulog
143
144 #
145 # DistributedRateLimiting
146 #
147 DistributedRateLimiting-MODULES := DistributedRateLimiting
148 DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
149 ALL += DistributedRateLimiting
150 IN_NODEREPO += DistributedRateLimiting
151
152 #
153 # pf2slice
154 #
155 pf2slice-MODULES := pf2slice
156 pf2slice-SPEC := pf2slice.spec
157 ALL += pf2slice
158
159 #
160 # PlanetLab Mom: Cleans up your mess
161 #
162 mom-MODULES := Mom
163 mom-SPEC := pl_mom.spec
164 ALL += mom
165 IN_BOOTSTRAPFS += mom
166
167 #
168 # iptables
169 #
170 iptables-MODULES := iptables
171 iptables-SPEC := iptables.spec
172 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
173 ALL += iptables
174 IN_BOOTSTRAPFS += iptables
175
176 #
177 # iproute
178 #
179 iproute-MODULES := iproute2
180 iproute-SPEC := iproute.spec
181 ALL += iproute
182 IN_BOOTSTRAPFS += iproute
183 IN_VSERVER += iproute
184 IN_BOOTCD += iproute
185
186 #
187 # inotify-tools - local import
188 # rebuild this on centos5 (not found) - see kexcludes in build.common
189 #
190 local_inotify_tools=false
191 ifeq "$(DISTRONAME)" "centos5"
192 local_inotify_tools=true
193 endif
194
195 ifeq "$(local_inotify_tools)" "true"
196 inotify-tools-MODULES := inotify-tools
197 inotify-tools-SPEC := inotify-tools.spec
198 inotify-tools-BUILD-FROM-SRPM := yes
199 IN_BOOTSTRAPFS += inotify-tools
200 ALL += inotify-tools
201 endif
202
203 #
204 # vsys
205 #
206 vsys-MODULES := vsys
207 vsys-SPEC := vsys.spec
208 ifeq "$(local_inotify_tools)" "true"
209 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
210 endif
211 IN_BOOTSTRAPFS += vsys
212 ALL += vsys
213
214 #
215 # vsys-scripts
216 #
217 vsys-scripts-MODULES := vsys-scripts
218 vsys-scripts-SPEC := vsys-scripts.spec
219 IN_BOOTSTRAPFS += vsys-scripts
220 ALL += vsys-scripts
221
222 #
223 # PLCAPI
224 #
225 plcapi-MODULES := plcapi
226 plcapi-SPEC := PLCAPI.spec
227 ALL += plcapi
228 IN_MYPLC += plcapi
229
230 #
231 # drupal
232
233 drupal-MODULES := drupal
234 drupal-SPEC := drupal.spec
235 drupal-BUILD-FROM-SRPM := yes
236 ALL += drupal
237 IN_MYPLC += drupal
238
239 #
240 # use the plewww module instead
241 #
242 plewww-MODULES := plewww
243 plewww-SPEC := plewww.spec
244 ALL += plewww
245 IN_MYPLC += plewww
246
247 #
248 # www-register-wizard
249 #
250 www-register-wizard-MODULES := www-register-wizard
251 www-register-wizard-SPEC := www-register-wizard.spec
252 ALL += www-register-wizard
253 IN_MYPLC += www-register-wizard
254
255 #
256 # pcucontrol
257 #
258 pcucontrol-MODULES := pcucontrol
259 pcucontrol-SPEC := pcucontrol.spec
260 ALL += pcucontrol
261
262 #
263 # monitor
264 #
265 monitor-MODULES := Monitor
266 monitor-SPEC := Monitor.spec
267 ALL += monitor
268 IN_BOOTSTRAPFS += monitor
269
270 #
271 # PLC RT
272 #
273 plcrt-MODULES := PLCRT
274 plcrt-SPEC := plcrt.spec
275 ALL += plcrt
276
277 #
278 # zabbix
279 #
280 zabbix-MODULES := Monitor
281 zabbix-SPEC := zabbix.spec
282 zabbix-BUILD-FROM-SRPM := yes
283 ALL += zabbix
284
285 #
286 # pyopenssl
287 #
288 pyopenssl-MODULES := pyopenssl
289 pyopenssl-SPEC := pyOpenSSL.spec
290 pyopenssl-BUILD-FROM-SRPM := yes
291 ALL += pyopenssl
292
293
294 #
295 # pyaspects
296 #
297 pyaspects-MODULES := pyaspects
298 pyaspects-SPEC := pyaspects.spec
299 pyaspects-BUILD-FROM-SRPM := yes
300 ALL += pyaspects
301
302 #
303 # ejabberd
304 #
305 ejabberd-MODULES := ejabberd
306 ejabberd-SPEC := ejabberd.spec
307 ejabberd-BUILD-FROM-SRPM := yes
308 # not needed anymore on f12 and above, that come with 2.1.5, and we had 2.1.3
309 # so, this is relevant on f8 and centos5 only
310 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
311 ALL += ejabberd
312 endif
313
314 #
315 # sfa - Slice Facility Architecture
316 #
317 sfa-MODULES := sfa
318 sfa-SPEC := sfa.spec
319 ALL += sfa
320
321 #
322 # nodeconfig
323 #
324 # xxx needed when upgrading to 5.0
325 #nodeconfig-MODULES := nodeconfig
326 nodeconfig-MODULES := nodeconfig
327 nodeconfig-SPEC := nodeconfig.spec
328 ALL += nodeconfig
329 IN_MYPLC += nodeconfig
330
331 #
332 # bootmanager
333 #
334 bootmanager-MODULES := bootmanager
335 bootmanager-SPEC := bootmanager.spec
336 ALL += bootmanager
337 IN_MYPLC += bootmanager
338
339 #
340 # pypcilib : used in bootcd
341
342 pypcilib-MODULES := pypcilib
343 pypcilib-SPEC := pypcilib.spec
344 ALL += pypcilib
345 IN_BOOTCD += pypcilib
346
347 #
348 # pyplnet
349 #
350 pyplnet-MODULES := pyplnet
351 pyplnet-SPEC := pyplnet.spec
352 ALL += pyplnet
353 IN_BOOTSTRAPFS += pyplnet
354 IN_MYPLC += pyplnet
355 IN_BOOTCD += pyplnet
356
357
358 #
359 # OMF resource controller
360 #
361 omf-resctl-MODULES := omf
362 omf-resctl-SPEC := omf-resctl.spec
363 ALL += omf-resctl
364 IN_VSERVER += omf-resctl
365
366 #
367 # OMF exp controller
368 #
369 omf-expctl-MODULES := omf
370 omf-expctl-SPEC := omf-expctl.spec
371 ALL += omf-expctl
372
373
374 #
375 # bootcd
376 #
377 bootcd-MODULES := bootcd build
378 bootcd-SPEC := bootcd.spec
379 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
380 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
381 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
382 bootcd-RPMDATE := yes
383 ALL += bootcd
384 IN_MYPLC += bootcd
385
386 #
387 # vserver : reference image for slices
388 #
389 vserver-MODULES := vserver-reference build
390 vserver-SPEC := vserver-reference.spec
391 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
392 vserver-DEPEND-FILES := RPMS/yumgroups.xml
393 vserver-RPMDATE := yes
394 ALL += vserver
395 IN_BOOTSTRAPFS += vserver
396
397 #
398 # bootstrapfs
399 #
400 bootstrapfs-MODULES := bootstrapfs build
401 bootstrapfs-SPEC := bootstrapfs.spec
402 bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
403 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
404 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
405 bootstrapfs-RPMDATE := yes
406 ALL += bootstrapfs
407 IN_MYPLC += bootstrapfs
408
409 #
410 # noderepo
411 #
412 # all rpms resulting from packages marked as being in bootstrapfs and vserver
413 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
414 # replace space with +++ (specvars cannot deal with spaces)
415 SPACE=$(subst x, ,x)
416 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
417
418 noderepo-MODULES := bootstrapfs
419 noderepo-SPEC := noderepo.spec
420 noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
421 # package requires all regular packages
422 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
423 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
424 #export rpm list to the specfile
425 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
426 noderepo-RPMDATE := yes
427 ALL += noderepo
428 IN_MYPLC += noderepo
429
430 #
431 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
432 #
433 myplc-MODULES := myplc
434 myplc-SPEC := myplc.spec
435 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
436 ALL += myplc
437
438 # myplc-docs only contains docs for PLCAPI and NMAPI, but
439 # we still need to pull MyPLC, as it is where the specfile lies, 
440 # together with the utility script docbook2drupal.sh
441 myplc-docs-MODULES := myplc plcapi nodemanager Monitor
442 myplc-docs-SPEC := myplc-docs.spec
443 ALL += myplc-docs
444
445 # using some other name than myplc-release, as this is a make target already
446 release-MODULES := myplc
447 release-SPEC := myplc-release.spec
448 release-RPMDATE := yes
449 ALL += release
450