openvswitch needs autoconf>=2.64, which is not easily installable on <f14
[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 yumexclude
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 # DistributedRateLimiting
186 #
187 DistributedRateLimiting-MODULES := DistributedRateLimiting
188 DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
189 ALL += DistributedRateLimiting
190 IN_NODEREPO += DistributedRateLimiting
191
192 #
193 # pf2slice
194 #
195 pf2slice-MODULES := pf2slice
196 pf2slice-SPEC := pf2slice.spec
197 ALL += pf2slice
198
199 #
200 # PlanetLab Mom: Cleans up your mess
201 #
202 mom-MODULES := Mom
203 mom-SPEC := pl_mom.spec
204 ALL += mom
205 IN_BOOTSTRAPFS += mom
206
207 #
208 # inotify-tools - local import
209 # rebuild this on centos5 (not found) - see yumexclude
210 #
211 local_inotify_tools=false
212 ifeq "$(DISTRONAME)" "centos5"
213 local_inotify_tools=true
214 endif
215
216 ifeq "$(DISTRONAME)" "sl6"
217 local_inotify_tools=true
218 endif
219
220 ifeq "$(local_inotify_tools)" "true"
221 inotify-tools-MODULES := inotify-tools
222 inotify-tools-SPEC := inotify-tools.spec
223 inotify-tools-BUILD-FROM-SRPM := yes
224 IN_BOOTSTRAPFS += inotify-tools
225 ALL += inotify-tools
226 endif
227
228 #
229 # openvswitch
230 #
231 openvswitch-MODULES := openvswitch
232 openvswitch-SPEC := openvswitch.spec
233 openvswitch-DEPEND-DEVEL-RPMS += kernel-devel
234
235 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f14 f15 f16)"
236 IN_BOOTSTRAPFS += openvswitch
237 ALL += openvswitch
238 endif
239
240 #
241 # vsys
242 #
243 vsys-MODULES := vsys
244 vsys-SPEC := vsys.spec
245 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
246 vsys-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
247 ifeq "$(local_inotify_tools)" "true"
248 vsys-DEPEND-DEVEL-RPMS += inotify-tools inotify-tools-devel
249 endif
250 IN_BOOTSTRAPFS += vsys
251 ALL += vsys
252
253 #
254 # vsyssh : installed in slivers
255 #
256 vsyssh-MODULES := vsys
257 vsyssh-SPEC := vsyssh.spec
258 IN_SLIVER += vsyssh
259 ALL += vsyssh
260
261 #
262 # vsys-scripts
263 #
264 vsys-scripts-MODULES := vsys-scripts
265 vsys-scripts-SPEC := vsys-scripts.spec
266 IN_BOOTSTRAPFS += vsys-scripts
267 ALL += vsys-scripts
268
269 #
270 # plcapi
271 #
272 plcapi-MODULES := plcapi
273 plcapi-SPEC := PLCAPI.spec
274 ALL += plcapi
275 IN_MYPLC += plcapi
276
277 #
278 # drupal
279
280 drupal-MODULES := drupal
281 drupal-SPEC := drupal.spec
282 drupal-BUILD-FROM-SRPM := yes
283 ALL += drupal
284 IN_MYPLC += drupal
285
286 #
287 # use the plewww module instead
288 #
289 plewww-MODULES := plewww
290 plewww-SPEC := plewww.spec
291 ALL += plewww
292 IN_MYPLC += plewww
293
294 #
295 # www-register-wizard
296 #
297 www-register-wizard-MODULES := www-register-wizard
298 www-register-wizard-SPEC := www-register-wizard.spec
299 ALL += www-register-wizard
300 IN_MYPLC += www-register-wizard
301
302 #
303 # pcucontrol
304 #
305 pcucontrol-MODULES := pcucontrol
306 pcucontrol-SPEC := pcucontrol.spec
307 ALL += pcucontrol
308
309 #
310 # monitor
311 #
312 monitor-MODULES := monitor
313 monitor-SPEC := Monitor.spec
314 monitor-DEVEL-RPMS += net-snmp net-snmp-devel
315 ALL += monitor
316 IN_BOOTSTRAPFS += monitor
317
318 #
319 # PLC RT
320 #
321 plcrt-MODULES := PLCRT
322 plcrt-SPEC := plcrt.spec
323 ALL += plcrt
324
325 # f12 has 0.9-1 already
326 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
327 #
328 # pyopenssl
329 #
330 pyopenssl-MODULES := pyopenssl
331 pyopenssl-SPEC := pyOpenSSL.spec
332 pyopenssl-BUILD-FROM-SRPM := yes
333 ALL += pyopenssl
334 endif
335
336 #
337 # pyaspects
338 #
339 pyaspects-MODULES := pyaspects
340 pyaspects-SPEC := pyaspects.spec
341 pyaspects-BUILD-FROM-SRPM := yes
342 ALL += pyaspects
343
344 #
345 # ejabberd
346 #
347 ejabberd-MODULES := ejabberd
348 ejabberd-SPEC := ejabberd.spec
349 ejabberd-BUILD-FROM-SRPM := yes
350 ejabberd-DEVEL-RPMS += erlang pam-devel hevea
351 # not needed anymore on f12 and above, that come with 2.1.5, and we had 2.1.3
352 # so, this is relevant on f8 and centos5 only
353 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
354 ALL += ejabberd
355 endif
356
357 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
358 build_sfa=true
359 ifeq "$(DISTRONAME)" "centos5"
360 build_sfa=false
361 endif
362
363 ifeq "$(build_sfa)" "true"
364 #
365 # sfa - Slice Facility Architecture
366 #
367 sfa-MODULES := sfa
368 sfa-SPEC := sfa.spec
369 ALL += sfa
370 endif
371
372 sface-MODULES := sface
373 sface-SPEC := sface.spec
374 ALL += sface
375
376 #
377 # nodeconfig
378 #
379 nodeconfig-MODULES := nodeconfig
380 nodeconfig-SPEC := nodeconfig.spec
381 ALL += nodeconfig
382 IN_MYPLC += nodeconfig
383
384 #
385 # bootmanager
386 #
387 bootmanager-MODULES := bootmanager
388 bootmanager-SPEC := bootmanager.spec
389 ALL += bootmanager
390 IN_MYPLC += bootmanager
391
392 #
393 # pypcilib : used in bootcd
394
395 pypcilib-MODULES := pypcilib
396 pypcilib-SPEC := pypcilib.spec
397 ALL += pypcilib
398 IN_BOOTCD += pypcilib
399
400 #
401 # pyplnet
402 #
403 pyplnet-MODULES := pyplnet
404 pyplnet-SPEC := pyplnet.spec
405 ALL += pyplnet
406 IN_BOOTSTRAPFS += pyplnet
407 IN_MYPLC += pyplnet
408 IN_BOOTCD += pyplnet
409
410 #
411 # OMF resource controller
412 #
413 omf-resctl-MODULES := omf
414 omf-resctl-SPEC := omf-resctl.spec
415 ALL += omf-resctl
416 IN_VSERVER += omf-resctl
417
418 #
419 # OMF exp controller
420 #
421 omf-expctl-MODULES := omf
422 omf-expctl-SPEC := omf-expctl.spec
423 ALL += omf-expctl
424
425 #
426 # bootcd
427 #
428 bootcd-MODULES := bootcd build
429 bootcd-SPEC := bootcd.spec
430 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
431 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
432 bootcd-RPMDATE := yes
433 ALL += bootcd
434 IN_MYPLC += bootcd
435
436 #
437 # vserver : reference image for slices
438 #
439 vserver-MODULES := vserver-reference build
440 vserver-SPEC := vserver-reference.spec
441 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
442 vserver-DEPEND-FILES := RPMS/yumgroups.xml
443 vserver-RPMDATE := yes
444 ALL += vserver
445 IN_BOOTSTRAPFS += vserver
446
447 #
448 # bootstrapfs
449 #
450 bootstrapfs-MODULES := bootstrapfs build
451 bootstrapfs-SPEC := bootstrapfs.spec
452 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
453 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
454 bootstrapfs-RPMDATE := yes
455 ALL += bootstrapfs
456 IN_MYPLC += bootstrapfs
457
458 #
459 # noderepo
460 #
461 # all rpms resulting from packages marked as being in bootstrapfs and vserver
462 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
463 # replace space with +++ (specvars cannot deal with spaces)
464 SPACE=$(subst x, ,x)
465 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
466
467 noderepo-MODULES := bootstrapfs
468 noderepo-SPEC := noderepo.spec
469 # package requires all embedded packages
470 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
471 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
472 #export rpm list to the specfile
473 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
474 noderepo-RPMDATE := yes
475 ALL += noderepo
476 IN_MYPLC += noderepo
477
478 #
479 # slicerepo
480 #
481 # all rpms resulting from packages marked as being in vserver
482 SLICEREPO_RPMS = $(foreach package,$(IN_VSERVER),$($(package).rpms))
483 # replace space with +++ (specvars cannot deal with spaces)
484 SPACE=$(subst x, ,x)
485 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
486
487 slicerepo-MODULES := bootstrapfs
488 slicerepo-SPEC := slicerepo.spec
489 # package requires all embedded packages
490 slicerepo-DEPEND-PACKAGES := $(IN_VSERVER)
491 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
492 #export rpm list to the specfile
493 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
494 slicerepo-RPMDATE := yes
495 ALL += slicerepo
496
497 #
498 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
499 #
500 myplc-MODULES := myplc
501 myplc-SPEC := myplc.spec
502 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
503 ALL += myplc
504
505 # myplc-docs only contains docs for PLCAPI and NMAPI, but
506 # we still need to pull MyPLC, as it is where the specfile lies, 
507 # together with the utility script docbook2drupal.sh
508 myplc-docs-MODULES := myplc plcapi nodemanager monitor
509 myplc-docs-SPEC := myplc-docs.spec
510 ALL += myplc-docs
511
512 # using some other name than myplc-release, as this is a make target already
513 release-MODULES := myplc
514 release-SPEC := myplc-release.spec
515 release-RPMDATE := yes
516 ALL += release