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