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