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