first draft at wexlxc
[wextoolbox.git] / wexlxc.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 #
12 # bbn
13 #
14 bbn-MODULES := bbn_80211
15 bbn-SPEC := bbn_80211.spec
16 bbn-BUILD-FROM-SRPM := yes
17 # now from the stock repo
18 bbn-DEVEL-RPMS := gnuradio gnuradio-devel boost boost-devel swig
19 #bbn-DEPEND-DEVEL-RPMS := gnuradio gnuradio-devel boost boost-devel
20 ALL += bbn
21 IN_NODEIMAGE += bbn
22
23 #
24 # crunchxml
25 #
26 crunchxml-MODULES := crunchxml
27 crunchxml-SPEC := crunchxml.spec
28 crunchxml-BUILD-FROM-SRPM := yes
29 crunchxml-DEVEL-RPMS := glib2-devel libxml-devel libxml2-devel scons
30 ALL += crunchxml
31 IN_NODEIMAGE += crunchxml
32
33 #
34 # spectools
35 #
36 spectools-MODULES := spectools
37 spectools-SPEC := spectools.spec
38 spectools-BUILD-FROM-SRPM := yes
39 spectools-DEVEL-RPMS := gtk2-devel
40 ALL += spectools
41 IN_NODEIMAGE += spectools
42
43 #
44 # sge
45 #
46 sge-MODULES := sge
47 sge-SPEC := sge.spec
48 sge-BUILD-FROM-SRPM := yes
49 sge-DEVEL-RPMS += kdevelop-devel kdevelop kdevelop-libs java-1.6.0-openjdk 
50 sge-DEVEL-RPMS += lesstif lesstif-devel
51
52 # turning this off - current focus is on deploying the sge box separately from myplc
53 # packaging is still broken, and we're exploring a ready-to-use distro on centos
54 # ALL += sge
55 # IN_NODEIMAGE += sge
56
57 #
58 # kernel
59 #
60 # use a package name with srpm in it:
61 # so the source rpm is created by running make srpm in the codebase
62 #
63
64 # rebuild kernel-3.1 on fedora14 due to instabilities of the stock kernel
65 ifeq "$(DISTRONAME)" "f14"
66 kernel-MODULES := linux-3
67 kernel-SPEC := kernel-3.1.spec
68 kernel-DEVEL-RPMS += gettext elfutils-devel
69 kernel-BUILD-FROM-SRPM := yes
70 ifeq "$(HOSTARCH)" "i386"
71 kernel-RPMFLAGS:= --target i686 --with firmware
72 else
73 kernel-RPMFLAGS:= --target $(HOSTARCH) --with firmware
74 endif
75 kernel-SPECVARS += kernelconfig=planetlab
76 KERNELS += kernel
77
78 kernels: $(KERNELS)
79 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
80
81 ALL += $(KERNELS)
82 # this is to mark on which image a given rpm is supposed to go
83 IN_BOOTCD += $(KERNELS)
84 IN_SLICEIMAGE += $(KERNELS)
85 IN_NODEIMAGE += $(KERNELS)
86 endif
87
88 #
89 # NodeUpdate
90 #
91 nodeupdate-MODULES := nodeupdate
92 nodeupdate-SPEC := NodeUpdate.spec
93 ALL += nodeupdate
94 IN_NODEIMAGE += nodeupdate
95
96 #
97 # ipod
98 #
99 ipod-MODULES := PingOfDeath
100 ipod-SPEC := ipod.spec
101 ALL += ipod
102 IN_NODEIMAGE += ipod
103
104 #
105 # NodeManager
106 #
107 nodemanager-MODULES := nodemanager
108 nodemanager-SPEC := NodeManager.spec
109 ALL += nodemanager
110 IN_NODEIMAGE += nodemanager
111
112 #
113 # pl_sshd
114 #
115 sshd-MODULES := pl_sshd
116 sshd-SPEC := pl_sshd.spec
117 ALL += sshd
118 IN_NODEIMAGE += sshd
119
120 #
121 # codemux: Port 80 demux
122 #
123 codemux-MODULES := codemux
124 codemux-SPEC   := codemux.spec
125 ALL += codemux
126 IN_NODEIMAGE += codemux
127
128 #
129 # fprobe-ulog
130 #
131 fprobe-ulog-MODULES := fprobe-ulog
132 fprobe-ulog-SPEC := fprobe-ulog.spec
133 ALL += fprobe-ulog
134 IN_NODEIMAGE += fprobe-ulog
135
136 #
137 # libvirt
138 #
139 libvirt-MODULES := libvirt
140 libvirt-SPEC    := libvirt.spec
141 libvirt-BUILD-FROM-SRPM := yes
142 libvirt-DEVEL-RPMS += libxml2-devel gnutls-devel device-mapper-devel yajl-devel gettext 
143 libvirt-DEVEL-RPMS += python-devel libcap-ng-devel libpciaccess-devel radvd numactl-devel 
144 libvirt-DEVEL-RPMS += xhtml1-dtds libxslt libtasn1-devel systemtap-sdt-devel iptables-ipv6 augeas 
145 libvirt-DEVEL-RPMS += libudev-devel
146 libvirt-RPMFLAGS := --without storage-disk --without storage-iscsi --without storage-scsi \
147                         --without storage-fs --without storage-lvm \
148                         --without polkit --without sasl --without audit --with capng --with udev \
149                         --without netcf --without avahi --without sanlock \
150                         --without xen --without qemu --without hyperv --without phyp --without esx \
151                         --without libxl \
152                         --define 'packager PlanetLab'
153 ALL += libvirt
154 IN_NODEREPO += libvirt
155 IN_NODEIMAGE += libvirt
156
157 #
158 # DistributedRateLimiting
159 #
160 #DistributedRateLimiting-MODULES := DistributedRateLimiting
161 #DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
162 #ALL += DistributedRateLimiting
163 #IN_NODEREPO += DistributedRateLimiting
164
165 #
166 # pf2slice
167 #
168 pf2slice-MODULES := pf2slice
169 pf2slice-SPEC := pf2slice.spec
170 ALL += pf2slice
171
172 ##
173 ## PlanetLab Mom: Cleans up your mess
174 ##
175 #mom-MODULES := Mom
176 #mom-SPEC := pl_mom.spec
177 #ALL += mom
178 #IN_NODEIMAGE += mom
179
180 #
181 # inotify-tools - local import
182 # rebuild this on centos5 (not found) - see yumexclude
183 #
184 local_inotify_tools=false
185 ifeq "$(DISTRONAME)" "centos5"
186 local_inotify_tools=true
187 endif
188
189 ifeq "$(DISTRONAME)" "sl6"
190 local_inotify_tools=true
191 endif
192
193 ifeq "$(local_inotify_tools)" "true"
194 inotify-tools-MODULES := inotify-tools
195 inotify-tools-SPEC := inotify-tools.spec
196 inotify-tools-BUILD-FROM-SRPM := yes
197 IN_NODEIMAGE += inotify-tools
198 ALL += inotify-tools
199 endif
200
201 #
202 # openvswitch
203 #
204 # openvswitch-MODULES := openvswitch
205 # openvswitch-SPEC := openvswitch.spec
206 # openvswitch-DEPEND-DEVEL-RPMS += kernel-devel
207 # IN_NODEIMAGE += openvswitch
208 # # build only on f14 as f16 has this natively
209 # ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f14)"
210 # ALL += openvswitch
211 # endif
212
213 #
214 # vsys
215 #
216 vsys-MODULES := vsys
217 vsys-SPEC := vsys.spec
218 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
219 vsys-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
220 ifeq "$(local_inotify_tools)" "true"
221 vsys-DEPEND-DEVEL-RPMS += inotify-tools inotify-tools-devel
222 endif
223 IN_NODEIMAGE += vsys
224 ALL += vsys
225
226 #
227 # vsyssh : installed in slivers
228 #
229 vsyssh-MODULES := vsys
230 vsyssh-SPEC := vsyssh.spec
231 IN_SLICEIMAGE += vsyssh
232 ALL += vsyssh
233
234 #
235 # vsys-scripts
236 #
237 vsys-scripts-MODULES := vsys-scripts
238 vsys-scripts-SPEC := vsys-scripts.spec
239 IN_NODEIMAGE += vsys-scripts
240 ALL += vsys-scripts
241
242 #
243 # plcapi
244 #
245 plcapi-MODULES := plcapi
246 plcapi-SPEC := PLCAPI.spec
247 ALL += plcapi
248 IN_MYPLC += plcapi
249
250 #
251 # drupal
252
253 drupal-MODULES := drupal
254 drupal-SPEC := drupal.spec
255 drupal-BUILD-FROM-SRPM := yes
256 ALL += drupal
257 IN_MYPLC += drupal
258
259 #
260 # use the plewww module instead
261 #
262 plewww-MODULES := plewww
263 plewww-SPEC := plewww.spec
264 ALL += plewww
265 IN_MYPLC += plewww
266
267 #
268 # www-register-wizard
269 #
270 www-register-wizard-MODULES := www-register-wizard
271 www-register-wizard-SPEC := www-register-wizard.spec
272 ALL += www-register-wizard
273 IN_MYPLC += www-register-wizard
274
275 #
276 # pcucontrol
277 #
278 pcucontrol-MODULES := pcucontrol
279 pcucontrol-SPEC := pcucontrol.spec
280 ALL += pcucontrol
281
282 #
283 # monitor
284 #
285 #monitor-MODULES := monitor
286 #monitor-SPEC := Monitor.spec
287 #monitor-DEVEL-RPMS += net-snmp net-snmp-devel
288 #ALL += monitor
289 #IN_NODEIMAGE += monitor
290
291 #
292 # PLC RT
293 #
294 plcrt-MODULES := PLCRT
295 plcrt-SPEC := plcrt.spec
296 ALL += plcrt
297
298 # f12 has 0.9-1 already
299 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
300 #
301 # pyopenssl
302 #
303 pyopenssl-MODULES := pyopenssl
304 pyopenssl-SPEC := pyOpenSSL.spec
305 pyopenssl-BUILD-FROM-SRPM := yes
306 ALL += pyopenssl
307 endif
308
309 #
310 # pyaspects
311 #
312 pyaspects-MODULES := pyaspects
313 pyaspects-SPEC := pyaspects.spec
314 pyaspects-BUILD-FROM-SRPM := yes
315 ALL += pyaspects
316
317 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
318 # In addition we now use sqlalchemy and 0.5 as per f12 is not compatible with our model
319 build_sfa=true
320 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 f12 centos5)"
321 build_sfa=false
322 endif
323
324 ifeq "$(build_sfa)" "true"
325 #
326 # sfa - Slice Facility Architecture
327 #
328 sfa-MODULES := sfa
329 sfa-SPEC := sfa.spec
330 ALL += sfa
331
332 sface-MODULES := sface
333 sface-SPEC := sface.spec
334 ALL += sface
335 endif
336
337 #
338 # nodeconfig
339 #
340 nodeconfig-MODULES := nodeconfig
341 nodeconfig-SPEC := nodeconfig.spec
342 ALL += nodeconfig
343 IN_MYPLC += nodeconfig
344
345 #
346 # bootmanager
347 #
348 bootmanager-MODULES := bootmanager
349 bootmanager-SPEC := bootmanager.spec
350 ALL += bootmanager
351 IN_MYPLC += bootmanager
352
353 #
354 # pypcilib : used in bootcd
355
356 pypcilib-MODULES := pypcilib
357 pypcilib-SPEC := pypcilib.spec
358 ALL += pypcilib
359 IN_BOOTCD += pypcilib
360
361 #
362 # pyplnet
363 #
364 pyplnet-MODULES := pyplnet
365 pyplnet-SPEC := pyplnet.spec
366 ALL += pyplnet
367 IN_NODEIMAGE += pyplnet
368 IN_MYPLC += pyplnet
369 IN_BOOTCD += pyplnet
370
371 #
372 # OMF resource controller
373 #
374 omf-resctl-MODULES := omf
375 omf-resctl-SPEC := omf-resctl.spec
376 ALL += omf-resctl
377 IN_SLICEIMAGE += omf-resctl
378
379 #
380 # OMF exp controller
381 #
382 omf-expctl-MODULES := omf
383 omf-expctl-SPEC := omf-expctl.spec
384 ALL += omf-expctl
385
386 #
387 # bootcd
388 #
389 bootcd-MODULES := bootcd build
390 bootcd-SPEC := bootcd.spec
391 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
392 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
393 bootcd-RPMDATE := yes
394 ALL += bootcd
395 IN_MYPLC += bootcd
396
397 #
398 # images for slices
399 #
400 sliceimage-MODULES := sliceimage build
401 sliceimage-SPEC := sliceimage.spec
402 sliceimage-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
403 sliceimage-DEPEND-FILES := RPMS/yumgroups.xml
404 sliceimage-RPMDATE := yes
405 ALL += sliceimage
406 IN_NODEIMAGE += sliceimage
407
408 #
409 # lxc-specific sliceimage initialization
410
411 lxc-sliceimage-MODULES  := sliceimage
412 lxc-sliceimage-SPEC     := lxc-sliceimage.spec
413 lxc-sliceimage-RPMDATE  := yes
414 ALL                     += lxc-sliceimage
415 IN_NODEIMAGE            += lxc-sliceimage
416
417 #
418 # nodeimage
419 #
420 nodeimage-MODULES := nodeimage build
421 nodeimage-SPEC := nodeimage.spec
422 nodeimage-DEPEND-PACKAGES := $(IN_NODEIMAGE)
423 nodeimage-DEPEND-FILES := RPMS/yumgroups.xml
424 nodeimage-RPMDATE := yes
425 ALL += nodeimage
426 IN_MYPLC += nodeimage
427
428 #
429 # noderepo
430 #
431 # all rpms resulting from packages marked as being in nodeimage and sliceimage
432 NODEREPO_RPMS = $(foreach package,$(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE),$($(package).rpms))
433 # replace space with +++ (specvars cannot deal with spaces)
434 SPACE=$(subst x, ,x)
435 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
436
437 noderepo-MODULES := nodeimage
438 noderepo-SPEC := noderepo.spec
439 # package requires all embedded packages
440 noderepo-DEPEND-PACKAGES := $(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE)
441 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
442 #export rpm list to the specfile
443 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
444 noderepo-RPMDATE := yes
445 ALL += noderepo
446 IN_MYPLC += noderepo
447
448 #
449 # slicerepo
450 #
451 # all rpms resulting from packages marked as being in vserver
452 SLICEREPO_RPMS = $(foreach package,$(IN_SLICEIMAGE),$($(package).rpms))
453 # replace space with +++ (specvars cannot deal with spaces)
454 SPACE=$(subst x, ,x)
455 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
456
457 slicerepo-MODULES := nodeimage
458 slicerepo-SPEC := slicerepo.spec
459 # package requires all embedded packages
460 slicerepo-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
461 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
462 #export rpm list to the specfile
463 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
464 slicerepo-RPMDATE := yes
465 ALL += slicerepo
466
467 #
468 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
469 #
470 myplc-MODULES := myplc
471 myplc-SPEC := myplc.spec
472 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
473 ALL += myplc
474
475 # myplc-docs only contains docs for PLCAPI and NMAPI, but
476 # we still need to pull MyPLC, as it is where the specfile lies, 
477 # together with the utility script docbook2drupal.sh
478 myplc-docs-MODULES := myplc plcapi nodemanager monitor
479 myplc-docs-SPEC := myplc-docs.spec
480 ALL += myplc-docs
481
482 # using some other name than myplc-release, as this is a make target already
483 release-MODULES := myplc
484 release-SPEC := myplc-release.spec
485 release-RPMDATE := yes
486 ALL += release