synced with onelab
[wextoolbox.git] / wextoolbox.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 ### NOTES on diffs with onelab
9 # 2.6.27 vs 2.6.22 - does not need iwlwifi exception anymore
10 # does not include:
11 # ipfw (might just work) - svn:ipfw
12 # ipfwslice - svn:ipfw
13 # nozomi (does not work on 2.6.27) svn:nozomi
14 # comgt - svn:comgt
15 # umts-backend - svn:planetlab-umts-tools
16 # umts-frontend - svn:planetlab-umts-tools
17 # dummynet_image - svn:dummynet_image
18
19 #
20 # see doc in Makefile  
21 #
22
23 #
24 # boost
25
26 # we rebuild this one only b/c f10 only has 1.34 and gnuradio needs >= 1.35
27 # this build is based on the f11 rpm, i.e. boost-1.37
28 #
29 boost-MODULES := boost
30 boost-SPEC := boost.spec
31 boost-BUILD-FROM-SRPM := yes
32 ALL += boost
33 IN_BOOTSTRAPFS += boost
34
35 #
36 # gnuradio
37 #
38 gnuradio-MODULES := gnuradio
39 gnuradio-SPEC := gnuradio.spec
40 gnuradio-BUILD-FROM-SRPM := yes
41 # boost-devel needs boost !
42 gnuradio-DEPEND-DEVEL-RPMS := boost boost-devel
43 ALL += gnuradio
44 IN_BOOTSTRAPFS += gnuradio
45
46 #
47 # bbn
48 #
49 bbn-MODULES := bbn_80211
50 bbn-SPEC := bbn_80211.spec
51 bbn-BUILD-FROM-SRPM := yes
52 bbn-DEPEND-DEVEL-RPMS := gnuradio gnuradio-devel boost boost-devel
53 ALL += bbn
54 IN_BOOTSTRAPFS += bbn
55
56 #
57 # crunchxml
58 #
59 crunchxml-MODULES := crunchxml
60 crunchxml-SPEC := crunchxml.spec
61 crunchxml-BUILD-FROM-SRPM := yes
62 ALL += crunchxml
63 IN_BOOTSTRAPFS += crunchxml
64
65 #
66 # spectools
67 #
68 spectools-MODULES := spectools
69 spectools-SPEC := spectools.spec
70 spectools-BUILD-FROM-SRPM := yes
71 ALL += spectools
72 IN_BOOTSTRAPFS += spectools
73
74 #
75 # sge
76 #
77 sge-MODULES := sge
78 sge-SPEC := sge.spec
79 sge-BUILD-FROM-SRPM := yes
80 # turning this off - current focus is on deploying the sge box separately from myplc
81 # packaging is still broken, and we're exploring a ready-t-o-use distro on centos
82 # ALL += sge
83 # IN_BOOTSTRAPFS += sge
84
85 #
86 # kernel
87 #
88 # use a package name with srpm in it:
89 # so the source rpm is created by running make srpm in the codebase
90 #
91
92 kernel-MODULES := linux-2.6
93 kernel-SPEC := kernel-2.6.spec
94 kernel-BUILD-FROM-SRPM := yes
95 ifeq "$(HOSTARCH)" "i386"
96 kernel-RPMFLAGS:= --target i686
97 else
98 kernel-RPMFLAGS:= --target $(HOSTARCH)
99 endif
100 ### not needed with 2.6.27 anymore
101 ### kernel-SPECVARS := iwlwifi=1
102 KERNELS += kernel
103
104 kernels: $(KERNELS)
105 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
106
107 ALL += $(KERNELS)
108 # this is to mark on which image a given rpm is supposed to go
109 IN_BOOTCD += $(KERNELS)
110 IN_VSERVER += $(KERNELS)
111 IN_BOOTSTRAPFS += $(KERNELS)
112 # turns out myplc installs kernel-vserver
113 IN_MYPLC += $(KERNELS)
114
115 #-broken-# #
116 #-broken-# # ipfw: root context module, and slice companion
117 #-broken-# #
118 #-broken-# ipfwroot-MODULES := ipfw
119 #-broken-# ipfwroot-SPEC := planetlab/ipfwroot.spec
120 #-broken-# ipfwroot-DEPEND-DEVEL-RPMS := kernel-devel
121 #-broken-# ipfwroot-SPECVARS = kernel_version=$(kernel.rpm-version) \
122 #-broken-#         kernel_release=$(kernel.rpm-release) \
123 #-broken-#         kernel_arch=$(kernel.rpm-arch)
124 #-broken-# ALL += ipfwroot
125 #-broken-# 
126 #-broken-# ipfwslice-MODULES := ipfw
127 #-broken-# ipfwslice-SPEC := planetlab/ipfwslice.spec
128 #-broken-# ipfwslice-SPECVARS = kernel_version=$(kernel.rpm-version) \
129 #-broken-#         kernel_release=$(kernel.rpm-release) \
130 #-broken-#         kernel_arch=$(kernel.rpm-arch)
131 #-broken-# ALL += ipfwslice
132
133 #
134 # madwifi
135 #
136 madwifi-MODULES := madwifi
137 madwifi-SPEC := madwifi.spec
138 madwifi-BUILD-FROM-SRPM := yes
139 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
140 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
141         kernel_release=$(kernel.rpm-release) \
142         kernel_arch=$(kernel.rpm-arch)
143 ALL += madwifi
144 IN_BOOTSTRAPFS += madwifi
145
146 #
147 # iptables
148 #
149 iptables-MODULES := iptables
150 iptables-SPEC := iptables.spec
151 iptables-BUILD-FROM-SRPM := yes
152 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
153 ALL += iptables
154 IN_BOOTSTRAPFS += iptables
155
156 #
157 # iproute
158 #
159 iproute-MODULES := iproute2
160 iproute-SPEC := iproute.spec
161 ALL += iproute
162 IN_BOOTSTRAPFS += iproute
163 IN_VSERVER += iproute
164 IN_BOOTCD += iproute
165
166 #
167 # util-vserver
168 #
169 util-vserver-MODULES := util-vserver
170 util-vserver-SPEC := util-vserver.spec
171 util-vserver-RPMFLAGS:= --without dietlibc
172 ALL += util-vserver
173 IN_BOOTSTRAPFS += util-vserver
174
175 #
176 # libnl - local import
177 # we need either 1.1 or at least 1.0.pre6
178 # rebuild this on centos5 - see kexcludes in build.common
179 #
180 local_libnl=false
181 ifeq "$(DISTRONAME)" "centos5"
182 local_libnl=true
183 endif
184
185 ifeq "$(local_libnl)" "true"
186 libnl-MODULES := libnl
187 libnl-SPEC := libnl.spec
188 libnl-BUILD-FROM-SRPM := yes
189 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
190 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
191 ALL += libnl
192 IN_BOOTSTRAPFS += libnl
193 endif
194
195 #
196 # util-vserver-pl
197 #
198 util-vserver-pl-MODULES := util-vserver-pl
199 util-vserver-pl-SPEC := util-vserver-pl.spec
200 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core 
201 ifeq "$(local_libnl)" "true"
202 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
203 endif
204 ALL += util-vserver-pl
205 IN_BOOTSTRAPFS += util-vserver-pl
206
207 #
208 # NodeUpdate
209 #
210 nodeupdate-MODULES := NodeUpdate
211 nodeupdate-SPEC := NodeUpdate.spec
212 ALL += nodeupdate
213 IN_BOOTSTRAPFS += nodeupdate
214
215 #
216 # ipod
217 #
218 ipod-MODULES := PingOfDeath
219 ipod-SPEC := ipod.spec
220 ALL += ipod
221 IN_BOOTSTRAPFS += ipod
222
223 #
224 # NodeManager
225 #
226 nodemanager-MODULES := NodeManager
227 nodemanager-SPEC := NodeManager.spec
228 ALL += nodemanager
229 IN_BOOTSTRAPFS += nodemanager
230
231 #
232 # pl_sshd
233 #
234 sshd-MODULES := pl_sshd
235 sshd-SPEC := pl_sshd.spec
236 ALL += sshd
237 IN_BOOTSTRAPFS += sshd
238
239 #
240 # codemux: Port 80 demux
241 #
242 codemux-MODULES := CoDemux
243 codemux-SPEC   := codemux.spec
244 #codemux-RPMBUILD := bash ./rpmbuild.sh
245 ALL += codemux
246 IN_BOOTSTRAPFS += codemux
247
248 #
249 # fprobe-ulog
250 #
251 fprobe-ulog-MODULES := fprobe-ulog
252 fprobe-ulog-SPEC := fprobe-ulog.spec
253 ALL += fprobe-ulog
254 IN_BOOTSTRAPFS += fprobe-ulog
255
256 #
257 # pf2slice
258 #
259 pf2slice-MODULES := pf2slice
260 pf2slice-SPEC := pf2slice.spec
261 ALL += pf2slice
262
263 #
264 # PlanetLab Mom: Cleans up your mess
265 #
266 mom-MODULES := Mom
267 mom-SPEC := pl_mom.spec
268 ALL += mom
269 IN_BOOTSTRAPFS += mom
270
271 #
272 # inotify-tools - local import
273 # rebuild this on centos5 (not found) - see kexcludes in build.common
274 #
275 local_inotify_tools=false
276 ifeq "$(DISTRONAME)" "centos5"
277 local_inotify_tools=true
278 endif
279
280 ifeq "$(local_inotify_tools)" "true"
281 inotify-tools-MODULES := inotify-tools
282 inotify-tools-SPEC := inotify-tools.spec
283 inotify-tools-BUILD-FROM-SRPM := yes
284 IN_BOOTSTRAPFS += inotify-tools
285 ALL += inotify-tools
286 endif
287
288 #
289 # vsys
290 #
291 vsys-MODULES := vsys
292 vsys-SPEC := vsys.spec
293 ifeq "$(local_inotify_tools)" "true"
294 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
295 endif
296 IN_BOOTSTRAPFS += vsys
297 ALL += vsys
298
299 #
300 # vsys-scripts
301 #
302 vsys-scripts-MODULES := vsys-scripts
303 vsys-scripts-SPEC := vsys-scripts.spec
304 IN_BOOTSTRAPFS += vsys-scripts
305 ALL += vsys-scripts
306
307 #
308 # plcapi
309 #
310 plcapi-MODULES := PLCAPI
311 plcapi-SPEC := PLCAPI.spec
312 ALL += plcapi
313 IN_MYPLC += plcapi
314
315 #
316 # drupal
317
318 drupal-MODULES := drupal
319 drupal-SPEC := drupal.spec
320 drupal-BUILD-FROM-SRPM := yes
321 ALL += drupal
322 IN_MYPLC += drupal
323
324 #
325 # use the plewww module instead
326 #
327 plewww-MODULES := PLEWWW
328 plewww-SPEC := plewww.spec
329 ALL += plewww
330 IN_MYPLC += plewww
331
332 #
333 # www-register-wizard
334 #
335 www-register-wizard-MODULES := www-register-wizard
336 www-register-wizard-SPEC := www-register-wizard.spec
337 ALL += www-register-wizard
338 IN_MYPLC += www-register-wizard
339
340 #
341 # pcucontrol
342 #
343 pcucontrol-MODULES := pcucontrol
344 pcucontrol-SPEC := pcucontrol.spec
345 ALL += pcucontrol
346
347 #
348 # monitor
349 #
350 monitor-MODULES := Monitor
351 monitor-SPEC := Monitor.spec
352 ALL += monitor
353 IN_BOOTSTRAPFS += monitor
354
355 #
356 # zabbix
357 #
358 zabbix-MODULES := Monitor
359 zabbix-SPEC := zabbix.spec
360 zabbix-BUILD-FROM-SRPM := yes
361 ALL += zabbix
362
363 #
364 # PLC RT
365 #
366 plcrt-MODULES := PLCRT
367 plcrt-SPEC := plcrt.spec
368 ALL += plcrt
369
370 #
371 # pyopenssl
372 #
373 pyopenssl-MODULES := pyopenssl
374 pyopenssl-SPEC := pyOpenSSL.spec
375 pyopenssl-BUILD-FROM-SRPM := yes
376 ALL += pyopenssl
377
378 #
379 # pyaspects
380 #
381 pyaspects-MODULES := pyaspects
382 pyaspects-SPEC := pyaspects.spec
383 pyaspects-BUILD-FROM-SRPM := yes
384 ALL += pyaspects
385
386 #
387 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
388 build_sfa=false
389
390 ifeq "$(build_sfa)" "true"
391 #
392 # sfa - Slice Facility Architecture
393 #
394 sfa-MODULES := sfa
395 sfa-SPEC := sfa.spec
396 ALL += sfa
397 endif
398
399 #
400 # nodeconfig
401 #
402 nodeconfig-MODULES := nodeconfig
403 nodeconfig-SPEC := nodeconfig.spec
404 ALL += nodeconfig
405 IN_MYPLC += nodeconfig
406
407 #
408 # bootmanager
409 #
410 bootmanager-MODULES := BootManager
411 bootmanager-SPEC := bootmanager.spec
412 ALL += bootmanager
413 IN_MYPLC += bootmanager
414
415 #
416 # pypcilib : used in bootcd
417
418 pypcilib-MODULES := pypcilib
419 pypcilib-SPEC := pypcilib.spec
420 ALL += pypcilib
421 IN_BOOTCD += pypcilib
422
423 #
424 # pyplnet
425 #
426 pyplnet-MODULES := pyplnet
427 pyplnet-SPEC := pyplnet.spec
428 ALL += pyplnet
429 IN_BOOTSTRAPFS += pyplnet
430 IN_MYPLC += pyplnet
431 IN_BOOTCD += pyplnet
432
433 #
434 # bootcd
435 #
436 bootcd-MODULES := BootCD build
437 bootcd-SPEC := bootcd.spec
438 bootcd-RPMBUILD := bash ./rpmbuild.sh
439 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
440 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
441 bootcd-RPMDATE := yes
442 ALL += bootcd
443 IN_MYPLC += bootcd
444
445 #
446 # vserver : reference image for slices
447 #
448 vserver-MODULES := VserverReference build
449 vserver-SPEC := vserver-reference.spec
450 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
451 vserver-DEPEND-FILES := RPMS/yumgroups.xml
452 vserver-RPMDATE := yes
453 ALL += vserver
454 IN_BOOTSTRAPFS += vserver
455
456 #
457 # bootstrapfs
458 #
459 bootstrapfs-MODULES := BootstrapFS build
460 bootstrapfs-SPEC := bootstrapfs.spec
461 bootstrapfs-RPMBUILD := bash ./rpmbuild.sh
462 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
463 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
464 bootstrapfs-RPMDATE := yes
465 ALL += bootstrapfs
466 IN_MYPLC += bootstrapfs
467
468 #
469 # noderepo
470 #
471 # all rpms resulting from packages marked as being in bootstrapfs and vserver
472 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
473 # replace space with +++ (specvars cannot deal with spaces)
474 SPACE=$(subst x, ,x)
475 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
476
477 noderepo-MODULES := BootstrapFS 
478 noderepo-SPEC := noderepo.spec
479 noderepo-RPMBUILD := bash ./rpmbuild.sh
480 # package requires all embedded packages
481 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
482 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
483 #export rpm list to the specfile
484 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
485 noderepo-RPMDATE := yes
486 ALL += noderepo
487 IN_MYPLC += noderepo
488
489 #
490 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
491 #
492 myplc-MODULES := MyPLC
493 myplc-SPEC := myplc.spec
494 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
495 ALL += myplc
496
497 # myplc-docs only contains docs for PLCAPI and NMAPI, but
498 # we still need to pull MyPLC, as it is where the specfile lies, 
499 # together with the utility script docbook2drupal.sh
500 myplc-docs-MODULES := MyPLC PLCAPI NodeManager Monitor
501 myplc-docs-SPEC := myplc-docs.spec
502 ALL += myplc-docs
503
504 # using some other name than myplc-release, as this is a make target already
505 release-MODULES := MyPLC
506 release-SPEC := myplc-release.spec
507 release-RPMDATE := yes
508 ALL += release