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