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