2cc3646fbcfb10933a362578970968fa7ceb74fc
[wextoolbox.git] / wexlxc.mk
1 #
2 ### status as of may 23 2012
3 # this essentially targets f16 of course
4 # however in f16 gnuradio comes as 3.4 while f14 had 3.2:
5 # [2012.05.23--wtx-f14-64] ~ # rpm -q gnuradio
6 # gnuradio-3.2.2-9.fc14.x86_64
7 # [2012.05.23--wexlxc-f16-64] ~ # rpm -q gnuradio
8 # gnuradio-3.4.2-7.fc16.x86_64
9 ###
10 # This causes bbn build crash
11 # our bbn comes from http://mirror.onelab.eu/third-party/bbn_80211-3.2.2.tar.gz
12 # and when built against gnuradio in f16, we're getting
13 #  g++ -DHAVE_CONFIG_H -I. -I../.. -pthread -I/usr/include/gnuradio -I/usr/include/python2.7 -g -O2 -Wall -Woverloaded-virtual -pthread -MT bbn.lo -M\
14 # D -MP -MF .deps/bbn.Tpo -c bbn.cc  -fPIC -DPIC -o .libs/bbn.o
15 # In file included from bbn.cc:4108:0:
16 # bbn_tap.h:38:24: fatal error: omnithread.h: No such file or directory
17 #
18 # I could not at first sight easily locate a new bbn that would be numbered 3.4
19 # all they have seems to be a svn repo...
20 #
21 # we'll start with using plain lxc for orange and we'll see if that's a real issue
22 # might as well be just fine
23 #
24 ### 
25 #
26 # declare the packages to be built and their dependencies
27 # initial version from Mark Huang
28 # Mark Huang <mlhuang@cs.princeton.edu>
29 # Copyright (C) 2003-2006 The Trustees of Princeton University
30 # rewritten by Thierry Parmentelat - INRIA Sophia Antipolis
31 #
32 # see doc in Makefile  
33 #
34
35 #
36 # bbn
37 #
38 bbn-MODULES := bbn_80211
39 bbn-SPEC := bbn_80211.spec
40 bbn-BUILD-FROM-SRPM := yes
41 # now from the stock repo
42 bbn-DEVEL-RPMS := gnuradio gnuradio-devel boost boost-devel swig
43 #bbn-DEPEND-DEVEL-RPMS := gnuradio gnuradio-devel boost boost-devel
44 ALL += bbn
45 IN_NODEIMAGE += bbn
46
47 #
48 # crunchxml
49 #
50 crunchxml-MODULES := crunchxml
51 crunchxml-SPEC := crunchxml.spec
52 crunchxml-BUILD-FROM-SRPM := yes
53 crunchxml-DEVEL-RPMS := glib2-devel libxml-devel libxml2-devel scons
54 ALL += crunchxml
55 IN_NODEIMAGE += crunchxml
56
57 #
58 # spectools
59 #
60 spectools-MODULES := spectools
61 spectools-SPEC := spectools.spec
62 spectools-BUILD-FROM-SRPM := yes
63 spectools-DEVEL-RPMS := gtk2-devel
64 ALL += spectools
65 IN_NODEIMAGE += spectools
66
67 #
68 # sge
69 #
70 sge-MODULES := sge
71 sge-SPEC := sge.spec
72 sge-BUILD-FROM-SRPM := yes
73 sge-DEVEL-RPMS += kdevelop-devel kdevelop kdevelop-libs java-1.6.0-openjdk 
74 sge-DEVEL-RPMS += lesstif lesstif-devel
75
76 # turning this off - current focus is on deploying the sge box separately from myplc
77 # packaging is still broken, and we're exploring a ready-to-use distro on centos
78 # ALL += sge
79 # IN_NODEIMAGE += sge
80
81 #
82 # kernel
83 #
84 # use a package name with srpm in it:
85 # so the source rpm is created by running make srpm in the codebase
86 #
87
88 # rebuild kernel-3.1 on fedora14 due to instabilities of the stock kernel
89 ifeq "$(DISTRONAME)" "f14"
90 kernel-MODULES := linux-3
91 kernel-SPEC := kernel-3.1.spec
92 kernel-DEVEL-RPMS += gettext elfutils-devel
93 kernel-BUILD-FROM-SRPM := yes
94 ifeq "$(HOSTARCH)" "i386"
95 kernel-RPMFLAGS:= --target i686 --with firmware
96 else
97 kernel-RPMFLAGS:= --target $(HOSTARCH) --with firmware
98 endif
99 kernel-SPECVARS += kernelconfig=planetlab
100 KERNELS += kernel
101
102 kernels: $(KERNELS)
103 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
104
105 ALL += $(KERNELS)
106 # this is to mark on which image a given rpm is supposed to go
107 IN_BOOTCD += $(KERNELS)
108 IN_SLICEIMAGE += $(KERNELS)
109 IN_NODEIMAGE += $(KERNELS)
110 endif
111
112 #
113 # NodeUpdate
114 #
115 nodeupdate-MODULES := nodeupdate
116 nodeupdate-SPEC := NodeUpdate.spec
117 ALL += nodeupdate
118 IN_NODEIMAGE += nodeupdate
119
120 #
121 # ipod
122 #
123 ipod-MODULES := PingOfDeath
124 ipod-SPEC := ipod.spec
125 ALL += ipod
126 IN_NODEIMAGE += ipod
127
128 #
129 # NodeManager
130 #
131 nodemanager-MODULES := nodemanager
132 nodemanager-SPEC := NodeManager.spec
133 ALL += nodemanager
134 IN_NODEIMAGE += nodemanager
135
136 #
137 # pl_sshd
138 #
139 sshd-MODULES := pl_sshd
140 sshd-SPEC := pl_sshd.spec
141 ALL += sshd
142 IN_NODEIMAGE += sshd
143
144 #
145 # codemux: Port 80 demux
146 #
147 codemux-MODULES := codemux
148 codemux-SPEC   := codemux.spec
149 ALL += codemux
150 IN_NODEIMAGE += codemux
151
152 #
153 # fprobe-ulog
154 #
155 fprobe-ulog-MODULES := fprobe-ulog
156 fprobe-ulog-SPEC := fprobe-ulog.spec
157 ALL += fprobe-ulog
158 IN_NODEIMAGE += fprobe-ulog
159
160 #
161 # libvirt
162 #
163 libvirt-MODULES := libvirt
164 libvirt-SPEC    := libvirt.spec
165 libvirt-BUILD-FROM-SRPM := yes
166 libvirt-DEVEL-RPMS += libxml2-devel gnutls-devel device-mapper-devel yajl-devel gettext 
167 libvirt-DEVEL-RPMS += python-devel libcap-ng-devel libpciaccess-devel radvd numactl-devel 
168 libvirt-DEVEL-RPMS += xhtml1-dtds libxslt libtasn1-devel systemtap-sdt-devel iptables-ipv6 augeas 
169 libvirt-DEVEL-RPMS += libudev-devel
170 libvirt-RPMFLAGS := --without storage-disk --without storage-iscsi --without storage-scsi \
171                         --without storage-fs --without storage-lvm \
172                         --without polkit --without sasl --without audit --with capng --with udev \
173                         --without netcf --without avahi --without sanlock \
174                         --without xen --without qemu --without hyperv --without phyp --without esx \
175                         --without libxl \
176                         --define 'packager PlanetLab'
177 ALL += libvirt
178 IN_NODEREPO += libvirt
179 IN_NODEIMAGE += libvirt
180
181 #
182 # DistributedRateLimiting
183 #
184 #DistributedRateLimiting-MODULES := DistributedRateLimiting
185 #DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
186 #ALL += DistributedRateLimiting
187 #IN_NODEREPO += DistributedRateLimiting
188
189 #
190 # pf2slice
191 #
192 pf2slice-MODULES := pf2slice
193 pf2slice-SPEC := pf2slice.spec
194 ALL += pf2slice
195
196 ##
197 ## PlanetLab Mom: Cleans up your mess
198 ##
199 #mom-MODULES := Mom
200 #mom-SPEC := pl_mom.spec
201 #ALL += mom
202 #IN_NODEIMAGE += mom
203
204 #
205 # inotify-tools - local import
206 # rebuild this on centos5 (not found) - see yumexclude
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_NODEIMAGE += 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_NODEIMAGE += openvswitch
232 # # build only on f14 as f16 has this natively
233 # ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f14)"
234 # ALL += openvswitch
235 # endif
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_NODEIMAGE += vsys
248 ALL += vsys
249
250 #
251 # vsyssh : installed in slivers
252 #
253 vsyssh-MODULES := vsys
254 vsyssh-SPEC := vsyssh.spec
255 IN_SLICEIMAGE += vsyssh
256 ALL += vsyssh
257
258 #
259 # vsys-scripts
260 #
261 vsys-scripts-MODULES := vsys-scripts
262 vsys-scripts-SPEC := vsys-scripts.spec
263 IN_NODEIMAGE += vsys-scripts
264 ALL += vsys-scripts
265
266 #
267 # plcapi
268 #
269 plcapi-MODULES := plcapi
270 plcapi-SPEC := PLCAPI.spec
271 ALL += plcapi
272 IN_MYPLC += plcapi
273
274 #
275 # drupal
276
277 drupal-MODULES := drupal
278 drupal-SPEC := drupal.spec
279 drupal-BUILD-FROM-SRPM := yes
280 ALL += drupal
281 IN_MYPLC += drupal
282
283 #
284 # use the plewww module instead
285 #
286 plewww-MODULES := plewww
287 plewww-SPEC := plewww.spec
288 ALL += plewww
289 IN_MYPLC += plewww
290
291 #
292 # www-register-wizard
293 #
294 www-register-wizard-MODULES := www-register-wizard
295 www-register-wizard-SPEC := www-register-wizard.spec
296 ALL += www-register-wizard
297 IN_MYPLC += www-register-wizard
298
299 #
300 # pcucontrol
301 #
302 pcucontrol-MODULES := pcucontrol
303 pcucontrol-SPEC := pcucontrol.spec
304 ALL += pcucontrol
305
306 #
307 # monitor
308 #
309 #monitor-MODULES := monitor
310 #monitor-SPEC := Monitor.spec
311 #monitor-DEVEL-RPMS += net-snmp net-snmp-devel
312 #ALL += monitor
313 #IN_NODEIMAGE += monitor
314
315 #
316 # PLC RT
317 #
318 plcrt-MODULES := PLCRT
319 plcrt-SPEC := plcrt.spec
320 ALL += plcrt
321
322 # f12 has 0.9-1 already
323 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
324 #
325 # pyopenssl
326 #
327 pyopenssl-MODULES := pyopenssl
328 pyopenssl-SPEC := pyOpenSSL.spec
329 pyopenssl-BUILD-FROM-SRPM := yes
330 ALL += pyopenssl
331 endif
332
333 #
334 # pyaspects
335 #
336 pyaspects-MODULES := pyaspects
337 pyaspects-SPEC := pyaspects.spec
338 pyaspects-BUILD-FROM-SRPM := yes
339 ALL += pyaspects
340
341 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
342 # In addition we now use sqlalchemy and 0.5 as per f12 is not compatible with our model
343 build_sfa=true
344 ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 f12 centos5)"
345 build_sfa=false
346 endif
347
348 ifeq "$(build_sfa)" "true"
349 #
350 # sfa - Slice Facility Architecture
351 #
352 sfa-MODULES := sfa
353 sfa-SPEC := sfa.spec
354 ALL += sfa
355
356 sface-MODULES := sface
357 sface-SPEC := sface.spec
358 ALL += sface
359 endif
360
361 #
362 # nodeconfig
363 #
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_NODEIMAGE += pyplnet
392 IN_MYPLC += pyplnet
393 IN_BOOTCD += pyplnet
394
395 #
396 # OMF resource controller
397 #
398 omf-resctl-MODULES := omf
399 omf-resctl-SPEC := omf-resctl.spec
400 ALL += omf-resctl
401 IN_SLICEIMAGE += omf-resctl
402
403 #
404 # OMF exp controller
405 #
406 omf-expctl-MODULES := omf
407 omf-expctl-SPEC := omf-expctl.spec
408 ALL += omf-expctl
409
410 #
411 # bootcd
412 #
413 bootcd-MODULES := bootcd build
414 bootcd-SPEC := bootcd.spec
415 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
416 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
417 bootcd-RPMDATE := yes
418 ALL += bootcd
419 IN_MYPLC += bootcd
420
421 #
422 # images for slices
423 #
424 sliceimage-MODULES := sliceimage build
425 sliceimage-SPEC := sliceimage.spec
426 sliceimage-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
427 sliceimage-DEPEND-FILES := RPMS/yumgroups.xml
428 sliceimage-RPMDATE := yes
429 ALL += sliceimage
430 IN_NODEIMAGE += sliceimage
431
432 #
433 # lxc-specific sliceimage initialization
434
435 lxc-sliceimage-MODULES  := sliceimage
436 lxc-sliceimage-SPEC     := lxc-sliceimage.spec
437 lxc-sliceimage-RPMDATE  := yes
438 ALL                     += lxc-sliceimage
439 IN_NODEIMAGE            += lxc-sliceimage
440
441 #
442 # nodeimage
443 #
444 nodeimage-MODULES := nodeimage build
445 nodeimage-SPEC := nodeimage.spec
446 nodeimage-DEPEND-PACKAGES := $(IN_NODEIMAGE)
447 nodeimage-DEPEND-FILES := RPMS/yumgroups.xml
448 nodeimage-RPMDATE := yes
449 ALL += nodeimage
450 IN_MYPLC += nodeimage
451
452 #
453 # noderepo
454 #
455 # all rpms resulting from packages marked as being in nodeimage and sliceimage
456 NODEREPO_RPMS = $(foreach package,$(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE),$($(package).rpms))
457 # replace space with +++ (specvars cannot deal with spaces)
458 SPACE=$(subst x, ,x)
459 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
460
461 noderepo-MODULES := nodeimage
462 noderepo-SPEC := noderepo.spec
463 # package requires all embedded packages
464 noderepo-DEPEND-PACKAGES := $(IN_NODEIMAGE) $(IN_NODEREPO) $(IN_SLICEIMAGE)
465 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
466 #export rpm list to the specfile
467 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
468 noderepo-RPMDATE := yes
469 ALL += noderepo
470 IN_MYPLC += noderepo
471
472 #
473 # slicerepo
474 #
475 # all rpms resulting from packages marked as being in vserver
476 SLICEREPO_RPMS = $(foreach package,$(IN_SLICEIMAGE),$($(package).rpms))
477 # replace space with +++ (specvars cannot deal with spaces)
478 SPACE=$(subst x, ,x)
479 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
480
481 slicerepo-MODULES := nodeimage
482 slicerepo-SPEC := slicerepo.spec
483 # package requires all embedded packages
484 slicerepo-DEPEND-PACKAGES := $(IN_SLICEIMAGE)
485 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
486 #export rpm list to the specfile
487 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
488 slicerepo-RPMDATE := yes
489 ALL += slicerepo
490
491 #
492 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
493 #
494 myplc-MODULES := myplc
495 myplc-SPEC := myplc.spec
496 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
497 ALL += myplc
498
499 # myplc-docs only contains docs for PLCAPI and NMAPI, but
500 # we still need to pull MyPLC, as it is where the specfile lies, 
501 # together with the utility script docbook2drupal.sh
502 myplc-docs-MODULES := myplc plcapi nodemanager monitor
503 myplc-docs-SPEC := myplc-docs.spec
504 ALL += myplc-docs
505
506 # using some other name than myplc-release, as this is a make target already
507 release-MODULES := myplc
508 release-SPEC := myplc-release.spec
509 release-RPMDATE := yes
510 ALL += release