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