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