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