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