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