inotify-tools is missing in SL6 as well
[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-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 "$(DISTRONAME)" "sl6"
214 local_inotify_tools=true
215 endif
216
217 ifeq "$(local_inotify_tools)" "true"
218 inotify-tools-MODULES := inotify-tools
219 inotify-tools-SPEC := inotify-tools.spec
220 inotify-tools-BUILD-FROM-SRPM := yes
221 IN_BOOTSTRAPFS += inotify-tools
222 ALL += inotify-tools
223 endif
224
225 #
226 # openvswitch
227 #
228 openvswitch-MODULES := openvswitch
229 openvswitch-SPEC := openvswitch.spec
230 openvswitch-DEPEND-DEVEL-RPMS += kernel-devel
231 IN_BOOTSTRAPFS += openvswitch
232 ALL += openvswitch
233
234 #
235 # vsys
236 #
237 vsys-MODULES := vsys
238 vsys-SPEC := vsys.spec
239 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
240 vsys-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
241 ifeq "$(local_inotify_tools)" "true"
242 vsys-DEPEND-DEVEL-RPMS += inotify-tools inotify-tools-devel
243 endif
244 IN_BOOTSTRAPFS += vsys
245 ALL += vsys
246
247 #
248 # vsys-scripts
249 #
250 vsys-scripts-MODULES := vsys-scripts
251 vsys-scripts-SPEC := vsys-scripts.spec
252 IN_BOOTSTRAPFS += vsys-scripts
253 ALL += vsys-scripts
254
255 #
256 # PLCAPI
257 #
258 plcapi-MODULES := plcapi
259 plcapi-SPEC := PLCAPI.spec
260 ALL += plcapi
261 IN_MYPLC += plcapi
262
263 #
264 # drupal
265
266 drupal-MODULES := drupal
267 drupal-SPEC := drupal.spec
268 drupal-BUILD-FROM-SRPM := yes
269 ALL += drupal
270 IN_MYPLC += drupal
271
272 #
273 # use the plewww module instead
274 #
275 plewww-MODULES := plewww
276 plewww-SPEC := plewww.spec
277 ALL += plewww
278 IN_MYPLC += plewww
279
280 #
281 # www-register-wizard
282 #
283 www-register-wizard-MODULES := www-register-wizard
284 www-register-wizard-SPEC := www-register-wizard.spec
285 ALL += www-register-wizard
286 IN_MYPLC += www-register-wizard
287
288 #
289 # pcucontrol
290 #
291 pcucontrol-MODULES := pcucontrol
292 pcucontrol-SPEC := pcucontrol.spec
293 ALL += pcucontrol
294
295 #
296 # monitor
297 #
298 monitor-MODULES := Monitor
299 monitor-SPEC := Monitor.spec
300 monitor-DEVEL-RPMS += net-snmp net-snmp-devel
301 ALL += monitor
302 IN_BOOTSTRAPFS += monitor
303
304 #
305 # PLC RT
306 #
307 plcrt-MODULES := PLCRT
308 plcrt-SPEC := plcrt.spec
309 ALL += plcrt
310
311 #
312 # zabbix
313 #
314 zabbix-MODULES := Monitor
315 zabbix-SPEC := zabbix.spec
316 zabbix-BUILD-FROM-SRPM := yes
317 zabbix-DEVEL-RPMS += python-cherrypy
318 ALL += zabbix
319
320 #
321 # pyopenssl
322 #
323 pyopenssl-MODULES := pyopenssl
324 pyopenssl-SPEC := pyOpenSSL.spec
325 pyopenssl-BUILD-FROM-SRPM := yes
326 ALL += pyopenssl
327
328
329 #
330 # pyaspects
331 #
332 pyaspects-MODULES := pyaspects
333 pyaspects-SPEC := pyaspects.spec
334 pyaspects-BUILD-FROM-SRPM := yes
335 ALL += pyaspects
336
337 #
338 # ejabberd
339 #
340 ejabberd-MODULES := ejabberd
341 ejabberd-SPEC := ejabberd.spec
342 ejabberd-BUILD-FROM-SRPM := yes
343 ejabberd-DEVEL-RPMS += erlang pam-devel hevea
344 # not needed anymore on f12 and above, that come with 2.1.5, and we had 2.1.3
345 # so, this is relevant on f8 and centos5 only
346 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
347 ALL += ejabberd
348 endif
349
350 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
351 build_sfa=true
352 ifeq "$(DISTRONAME)" "centos5"
353 build_sfa=false
354 endif
355
356 ifeq "$(build_sfa)" "true"
357 #
358 # sfa - Slice Facility Architecture
359 #
360 sfa-MODULES := sfa
361 sfa-SPEC := sfa.spec
362 ALL += sfa
363 endif
364
365 #
366 # nodeconfig
367 #
368 # xxx needed when upgrading to 5.0
369 #nodeconfig-MODULES := nodeconfig
370 nodeconfig-MODULES := nodeconfig
371 nodeconfig-SPEC := nodeconfig.spec
372 ALL += nodeconfig
373 IN_MYPLC += nodeconfig
374
375 #
376 # bootmanager
377 #
378 bootmanager-MODULES := bootmanager
379 bootmanager-SPEC := bootmanager.spec
380 ALL += bootmanager
381 IN_MYPLC += bootmanager
382
383 #
384 # pypcilib : used in bootcd
385
386 pypcilib-MODULES := pypcilib
387 pypcilib-SPEC := pypcilib.spec
388 ALL += pypcilib
389 IN_BOOTCD += pypcilib
390
391 #
392 # pyplnet
393 #
394 pyplnet-MODULES := pyplnet
395 pyplnet-SPEC := pyplnet.spec
396 ALL += pyplnet
397 IN_BOOTSTRAPFS += pyplnet
398 IN_MYPLC += pyplnet
399 IN_BOOTCD += pyplnet
400
401
402 #
403 # OMF resource controller
404 #
405 omf-resctl-MODULES := omf
406 omf-resctl-SPEC := omf-resctl.spec
407 ALL += omf-resctl
408 IN_VSERVER += omf-resctl
409
410 #
411 # OMF exp controller
412 #
413 omf-expctl-MODULES := omf
414 omf-expctl-SPEC := omf-expctl.spec
415 ALL += omf-expctl
416
417
418 #
419 # bootcd
420 #
421 bootcd-MODULES := bootcd build
422 bootcd-SPEC := bootcd.spec
423 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
424 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
425 bootcd-RPMDATE := yes
426 ALL += bootcd
427 IN_MYPLC += bootcd
428
429 #
430 # vserver : reference image for slices
431 #
432 vserver-MODULES := vserver-reference build
433 vserver-SPEC := vserver-reference.spec
434 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
435 vserver-DEPEND-FILES := RPMS/yumgroups.xml
436 vserver-RPMDATE := yes
437 ALL += vserver
438 IN_BOOTSTRAPFS += vserver
439
440 #
441 # bootstrapfs
442 #
443 bootstrapfs-MODULES := bootstrapfs build
444 bootstrapfs-SPEC := bootstrapfs.spec
445 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
446 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
447 bootstrapfs-RPMDATE := yes
448 ALL += bootstrapfs
449 IN_MYPLC += bootstrapfs
450
451 #
452 # noderepo
453 #
454 # all rpms resulting from packages marked as being in bootstrapfs and vserver
455 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
456 # replace space with +++ (specvars cannot deal with spaces)
457 SPACE=$(subst x, ,x)
458 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
459
460 noderepo-MODULES := bootstrapfs
461 noderepo-SPEC := noderepo.spec
462 # package requires all regular packages
463 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
464 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
465 #export rpm list to the specfile
466 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
467 noderepo-RPMDATE := yes
468 ALL += noderepo
469 IN_MYPLC += noderepo
470
471 #
472 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
473 #
474 myplc-MODULES := myplc
475 myplc-SPEC := myplc.spec
476 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
477 ALL += myplc
478
479 # myplc-docs only contains docs for PLCAPI and NMAPI, but
480 # we still need to pull MyPLC, as it is where the specfile lies, 
481 # together with the utility script docbook2drupal.sh
482 myplc-docs-MODULES := myplc plcapi nodemanager Monitor
483 myplc-docs-SPEC := myplc-docs.spec
484 ALL += myplc-docs
485
486 # using some other name than myplc-release, as this is a make target already
487 release-MODULES := myplc
488 release-SPEC := myplc-release.spec
489 release-RPMDATE := yes
490 ALL += release
491