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