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