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