e91e8a4a0f8c3353108986c21eda5e8f5022d212
[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 # ejabberd
388 #
389 ejabberd-MODULES := ejabberd
390 ejabberd-SPEC := ejabberd.spec
391 ejabberd-BUILD-FROM-SRPM := yes
392 ALL += ejabberd
393
394 # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
395 build_sfa=false
396
397 ifeq "$(build_sfa)" "true"
398 #
399 # sfa - Slice Facility Architecture
400 #
401 sfa-MODULES := sfa
402 sfa-SPEC := sfa.spec
403 ALL += sfa
404 endif
405
406 #
407 # nodeconfig
408 #
409 nodeconfig-MODULES := nodeconfig
410 nodeconfig-SPEC := nodeconfig.spec
411 ALL += nodeconfig
412 IN_MYPLC += nodeconfig
413
414 #
415 # bootmanager
416 #
417 bootmanager-MODULES := bootmanager
418 bootmanager-SPEC := bootmanager.spec
419 ALL += bootmanager
420 IN_MYPLC += bootmanager
421
422 #
423 # pypcilib : used in bootcd
424
425 pypcilib-MODULES := pypcilib
426 pypcilib-SPEC := pypcilib.spec
427 ALL += pypcilib
428 IN_BOOTCD += pypcilib
429
430 #
431 # pyplnet
432 #
433 pyplnet-MODULES := pyplnet
434 pyplnet-SPEC := pyplnet.spec
435 ALL += pyplnet
436 IN_BOOTSTRAPFS += pyplnet
437 IN_MYPLC += pyplnet
438 IN_BOOTCD += pyplnet
439
440 #
441 # OMF resource controller
442 #
443 omf-resctl-MODULES := omf
444 omf-resctl-SPEC := omf-resctl.spec
445 ALL += omf-resctl
446 IN_VSERVER += omf-resctl
447
448 #
449 # OMF exp controller
450 #
451 omf-expctl-MODULES := omf
452 omf-expctl-SPEC := omf-expctl.spec
453 ALL += omf-expctl
454
455 #
456 # bootcd
457 #
458 bootcd-MODULES := bootcd build
459 bootcd-SPEC := bootcd.spec
460 bootcd-RPMBUILD := bash ./rpmbuild.sh
461 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
462 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
463 bootcd-RPMDATE := yes
464 ALL += bootcd
465 IN_MYPLC += bootcd
466
467 #
468 # vserver : reference image for slices
469 #
470 vserver-MODULES := vserver-reference build
471 vserver-SPEC := vserver-reference.spec
472 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
473 vserver-DEPEND-FILES := RPMS/yumgroups.xml
474 vserver-RPMDATE := yes
475 ALL += vserver
476 IN_BOOTSTRAPFS += vserver
477
478 #
479 # bootstrapfs
480 #
481 bootstrapfs-MODULES := bootstrapfs build
482 bootstrapfs-SPEC := bootstrapfs.spec
483 bootstrapfs-RPMBUILD := bash ./rpmbuild.sh
484 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
485 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
486 bootstrapfs-RPMDATE := yes
487 ALL += bootstrapfs
488 IN_MYPLC += bootstrapfs
489
490 #
491 # noderepo
492 #
493 # all rpms resulting from packages marked as being in bootstrapfs and vserver
494 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
495 # replace space with +++ (specvars cannot deal with spaces)
496 SPACE=$(subst x, ,x)
497 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
498
499 noderepo-MODULES := bootstrapfs
500 noderepo-SPEC := noderepo.spec
501 noderepo-RPMBUILD := bash ./rpmbuild.sh
502 # package requires all embedded packages
503 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
504 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
505 #export rpm list to the specfile
506 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
507 noderepo-RPMDATE := yes
508 ALL += noderepo
509 IN_MYPLC += noderepo
510
511 #
512 # slicerepo
513 #
514 # all rpms resulting from packages marked as being in vserver
515 SLICEREPO_RPMS = $(foreach package,$(IN_VSERVER),$($(package).rpms))
516 # replace space with +++ (specvars cannot deal with spaces)
517 SPACE=$(subst x, ,x)
518 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
519
520 slicerepo-MODULES := bootstrapfs
521 slicerepo-SPEC := slicerepo.spec
522 slicerepo-RPMBUILD := bash ./rpmbuild.sh
523 # package requires all embedded packages
524 slicerepo-DEPEND-PACKAGES := $(IN_VSERVER)
525 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
526 #export rpm list to the specfile
527 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
528 slicerepo-RPMDATE := yes
529 ALL += slicerepo
530
531 #
532 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
533 #
534 myplc-MODULES := myplc
535 myplc-SPEC := myplc.spec
536 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
537 ALL += myplc
538
539 # myplc-docs only contains docs for PLCAPI and NMAPI, but
540 # we still need to pull MyPLC, as it is where the specfile lies, 
541 # together with the utility script docbook2drupal.sh
542 myplc-docs-MODULES := myplc plcapi nodemanager Monitor
543 myplc-docs-SPEC := myplc-docs.spec
544 ALL += myplc-docs
545
546 # using some other name than myplc-release, as this is a make target already
547 release-MODULES := myplc
548 release-SPEC := myplc-release.spec
549 release-RPMDATE := yes
550 ALL += release