kexclude->yumexclude
[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 ########## this should not be needed with f14 anymore 
24 #f14# #
25 #f14# # boost
26 #f14# # 
27 #f14# # we rebuild this one only b/c f10 only has 1.34 and gnuradio needs >= 1.35
28 #f14# # this build is based on the f11 rpm, i.e. boost-1.37
29 #f14# #
30 #f14# boost-MODULES := boost
31 #f14# boost-SPEC := boost.spec
32 #f14# boost-BUILD-FROM-SRPM := yes
33 #f14# boost-DEVEL-RPMS := bzip2-devel libicu-devel chrpath
34 #f14# ALL += boost
35 #f14# IN_BOOTSTRAPFS += boost
36 #f14# 
37 #f14# #
38 #f14# # gnuradio
39 #f14# #
40 #f14# gnuradio-MODULES := gnuradio
41 #f14# gnuradio-SPEC := gnuradio.spec
42 #f14# gnuradio-BUILD-FROM-SRPM := yes
43 #f14# gnuradio-DEVEL-RPMS := python-numeric numpy wxPython PyQt4 swig fftw sdcc gsl guile cppunit fftw-devel gsl-devel libusb-devel cppunit-devel
44 #f14# # boost-devel needs boost !
45 #f14# gnuradio-DEPEND-DEVEL-RPMS := boost boost-devel
46 #f14# ALL += gnuradio
47 #f14# IN_BOOTSTRAPFS += gnuradio
48
49 #
50 # bbn
51 #
52 bbn-MODULES := bbn_80211
53 bbn-SPEC := bbn_80211.spec
54 bbn-BUILD-FROM-SRPM := yes
55 # now from the stock repo
56 bbn-DEVEL-RPMS := gnuradio gnuradio-devel boost boost-devel swig
57 #bbn-DEPEND-DEVEL-RPMS := gnuradio gnuradio-devel boost boost-devel
58 ALL += bbn
59 IN_BOOTSTRAPFS += bbn
60
61 #
62 # crunchxml
63 #
64 crunchxml-MODULES := crunchxml
65 crunchxml-SPEC := crunchxml.spec
66 crunchxml-BUILD-FROM-SRPM := yes
67 crunchxml-DEVEL-RPMS := glib2-devel libxml-devel libxml2-devel scons
68 ALL += crunchxml
69 IN_BOOTSTRAPFS += crunchxml
70
71 #
72 # spectools
73 #
74 spectools-MODULES := spectools
75 spectools-SPEC := spectools.spec
76 spectools-BUILD-FROM-SRPM := yes
77 spectools-DEVEL-RPMS := gtk2-devel
78 ALL += spectools
79 IN_BOOTSTRAPFS += spectools
80
81 #
82 # sge
83 #
84 sge-MODULES := sge
85 sge-SPEC := sge.spec
86 sge-BUILD-FROM-SRPM := yes
87 sge-DEVEL-RPMS += kdevelop-devel kdevelop kdevelop-libs java-1.6.0-openjdk 
88 sge-DEVEL-RPMS += lesstif lesstif-devel
89
90 # turning this off - current focus is on deploying the sge box separately from myplc
91 # packaging is still broken, and we're exploring a ready-t-o-use distro on centos
92 # ALL += sge
93 # IN_BOOTSTRAPFS += sge
94
95 #
96 # kernel
97 #
98 # use a package name with srpm in it:
99 # so the source rpm is created by running make srpm in the codebase
100 #
101
102 kernel-MODULES := linux-2.6
103 kernel-SPEC := kernel-2.6.spec
104 kernel-BUILD-FROM-SRPM := yes
105 ifeq "$(HOSTARCH)" "i386"
106 kernel-RPMFLAGS:= --target i686
107 else
108 kernel-RPMFLAGS:= --target $(HOSTARCH)
109 endif
110 # this is useful for 2.6.22 but will not be needed anymore with 2.6.27
111 kernel-SPECVARS += iwlwifi=1 
112 kernel-SPECVARS += kernelconfig=planetlab
113 KERNELS += kernel
114
115 kernels: $(KERNELS)
116 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
117
118 ALL += $(KERNELS)
119 # this is to mark on which image a given rpm is supposed to go
120 IN_BOOTCD += $(KERNELS)
121 IN_VSERVER += $(KERNELS)
122 IN_BOOTSTRAPFS += $(KERNELS)
123
124 #
125 # ipfw: root context module, and slice companion
126 #
127 ipfwroot-MODULES := ipfw
128 ipfwroot-SPEC := planetlab/ipfwroot.spec
129 ipfwroot-DEPEND-DEVEL-RPMS += kernel-devel
130 ipfwroot-SPECVARS = kernel_version=$(kernel.rpm-version) \
131         kernel_release=$(kernel.rpm-release) \
132         kernel_arch=$(kernel.rpm-arch)
133 ALL += ipfwroot
134 IN_BOOTSTRAPFS += ipfwroot
135
136 ipfwslice-MODULES := ipfw
137 ipfwslice-SPEC := planetlab/ipfwslice.spec
138 ipfwslice-SPECVARS = kernel_version=$(kernel.rpm-version) \
139         kernel_release=$(kernel.rpm-release) \
140         kernel_arch=$(kernel.rpm-arch)
141 ALL += ipfwslice
142
143 #
144 # madwifi
145 #
146 madwifi-MODULES := madwifi
147 madwifi-SPEC := madwifi.spec
148 madwifi-BUILD-FROM-SRPM := yes
149 madwifi-DEPEND-DEVEL-RPMS += kernel-devel
150 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
151         kernel_release=$(kernel.rpm-release) \
152         kernel_arch=$(kernel.rpm-arch)
153 ALL += madwifi
154 IN_BOOTSTRAPFS += madwifi
155
156 ### # 
157 ### # nozomi
158 ### # 
159 ### nozomi-MODULES := nozomi
160 ### nozomi-SPEC := nozomi.spec
161 ### nozomi-DEPEND-DEVEL-RPMS += kernel-devel
162 ### nozomi-SPECVARS = kernel_version=$(kernel.rpm-version) \
163 ###     kernel_release=$(kernel.rpm-release) \
164 ###     kernel_arch=$(kernel.rpm-arch)
165 ### IN_BOOTSTRAPFS += nozomi
166 ### ALL += nozomi
167
168 ### #
169 ### # comgt
170 ### # 
171 ### comgt-MODULES := comgt
172 ### comgt-SPEC := comgt.spec
173 ### IN_BOOTSTRAPFS += comgt
174 ### ALL += comgt
175
176 #
177 # umts: root context stuff
178 #
179 umts-backend-MODULES := planetlab-umts-tools
180 umts-backend-SPEC := backend.spec
181 IN_BOOTSTRAPFS += umts-backend
182 ALL += umts-backend
183
184 #
185 # umts: slice tools
186 #
187 umts-frontend-MODULES := planetlab-umts-tools
188 umts-frontend-SPEC := frontend.spec
189 IN_VSERVER += umts-frontend
190 ALL += umts-frontend
191
192 #
193 # iptables
194 #
195 iptables-MODULES := iptables
196 iptables-SPEC := iptables.spec
197 iptables-DEPEND-DEVEL-RPMS += kernel-devel kernel-headers
198 ALL += iptables
199 IN_BOOTSTRAPFS += iptables
200
201 #
202 # iproute
203 #
204 iproute-MODULES := iproute2
205 iproute-SPEC := iproute.spec
206 ALL += iproute
207 IN_BOOTSTRAPFS += iproute
208 IN_VSERVER += iproute
209 IN_BOOTCD += iproute
210
211 #
212 # util-vserver
213 #
214 util-vserver-MODULES := util-vserver
215 util-vserver-SPEC := util-vserver.spec
216 util-vserver-RPMFLAGS:= --without dietlibc
217 ALL += util-vserver
218 IN_BOOTSTRAPFS += util-vserver
219
220 #
221 # libnl - local import
222 # we need either 1.1 or at least 1.0.pre6
223 # rebuild this on centos5 - see yumexclude
224 #
225 local_libnl=false
226 ifeq "$(DISTRONAME)" "centos5"
227 local_libnl=true
228 endif
229
230 ifeq "$(local_libnl)" "true"
231 libnl-MODULES := libnl
232 libnl-SPEC := libnl.spec
233 libnl-BUILD-FROM-SRPM := yes
234 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
235 libnl-DEPEND-DEVEL-RPMS += kernel-devel kernel-headers
236 ALL += libnl
237 IN_BOOTSTRAPFS += libnl
238 endif
239
240 #
241 # util-vserver-pl
242 #
243 util-vserver-pl-MODULES := util-vserver-pl
244 util-vserver-pl-SPEC := util-vserver-pl.spec
245 util-vserver-pl-DEPEND-DEVEL-RPMS += util-vserver-lib util-vserver-devel util-vserver-core 
246 ifeq "$(local_libnl)" "true"
247 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
248 endif
249 ALL += util-vserver-pl
250 IN_BOOTSTRAPFS += util-vserver-pl
251
252 #
253 # NodeUpdate
254 #
255 nodeupdate-MODULES := nodeupdate
256 nodeupdate-SPEC := NodeUpdate.spec
257 ALL += nodeupdate
258 IN_BOOTSTRAPFS += nodeupdate
259
260 #
261 # ipod
262 #
263 ipod-MODULES := PingOfDeath
264 ipod-SPEC := ipod.spec
265 ALL += ipod
266 IN_BOOTSTRAPFS += ipod
267
268 #
269 # NodeManager
270 #
271 nodemanager-MODULES := nodemanager
272 nodemanager-SPEC := NodeManager.spec
273 ALL += nodemanager
274 IN_BOOTSTRAPFS += nodemanager
275
276 #
277 # pl_sshd
278 #
279 sshd-MODULES := pl_sshd
280 sshd-SPEC := pl_sshd.spec
281 ALL += sshd
282 IN_BOOTSTRAPFS += sshd
283
284 #
285 # codemux: Port 80 demux
286 #
287 codemux-MODULES := codemux
288 codemux-SPEC   := codemux.spec
289 ALL += codemux
290 IN_BOOTSTRAPFS += codemux
291
292 #
293 # fprobe-ulog
294 #
295 fprobe-ulog-MODULES := fprobe-ulog
296 fprobe-ulog-SPEC := fprobe-ulog.spec
297 ALL += fprobe-ulog
298 IN_BOOTSTRAPFS += fprobe-ulog
299
300 ### #
301 ### # DistributedRateLimiting
302 ### #
303 ### DistributedRateLimiting-MODULES := DistributedRateLimiting
304 ### DistributedRateLimiting-SPEC := DistributedRateLimiting.spec
305 ### ALL += DistributedRateLimiting
306 ### IN_NODEREPO += DistributedRateLimiting
307
308
309 #
310 # pf2slice
311 #
312 pf2slice-MODULES := pf2slice
313 pf2slice-SPEC := pf2slice.spec
314 ALL += pf2slice
315
316 #
317 # PlanetLab Mom: Cleans up your mess
318 #
319 mom-MODULES := Mom
320 mom-SPEC := pl_mom.spec
321 ALL += mom
322 IN_BOOTSTRAPFS += mom
323
324 #
325 # inotify-tools - local import
326 # rebuild this on centos5 (not found) - see yumexclude
327 #
328 local_inotify_tools=false
329 ifeq "$(DISTRONAME)" "centos5"
330 local_inotify_tools=true
331 endif
332
333 ifeq "$(local_inotify_tools)" "true"
334 inotify-tools-MODULES := inotify-tools
335 inotify-tools-SPEC := inotify-tools.spec
336 inotify-tools-BUILD-FROM-SRPM := yes
337 IN_BOOTSTRAPFS += inotify-tools
338 ALL += inotify-tools
339 endif
340
341 ### #
342 ### # openvswitch
343 ### #
344 ### openvswitch-MODULES := openvswitch
345 ### openvswitch-SPEC := openvswitch.spec
346 ### openvswitch-DEPEND-DEVEL-RPMS += kernel-devel
347 ### IN_BOOTSTRAPFS += openvswitch
348 ### ALL += openvswitch
349
350 #
351 # vsys
352 #
353 vsys-MODULES := vsys
354 vsys-SPEC := vsys.spec
355 vsys-DEVEL-RPMS += ocaml-ocamldoc
356 ifeq "$(local_inotify_tools)" "true"
357 vsys-DEPEND-DEVEL-RPMS += inotify-tools inotify-tools-devel
358 endif
359 IN_BOOTSTRAPFS += vsys
360 ALL += vsys
361
362 #
363 # vsys-scripts
364 #
365 vsys-scripts-MODULES := vsys-scripts
366 vsys-scripts-SPEC := vsys-scripts.spec
367 IN_BOOTSTRAPFS += vsys-scripts
368 ALL += vsys-scripts
369
370 #
371 # plcapi
372 #
373 plcapi-MODULES := plcapi
374 plcapi-SPEC := PLCAPI.spec
375 ALL += plcapi
376 IN_MYPLC += plcapi
377
378 #
379 # drupal
380
381 drupal-MODULES := drupal
382 drupal-SPEC := drupal.spec
383 drupal-BUILD-FROM-SRPM := yes
384 ALL += drupal
385 IN_MYPLC += drupal
386
387 #
388 # use the plewww module instead
389 #
390 plewww-MODULES := plewww
391 plewww-SPEC := plewww.spec
392 ALL += plewww
393 IN_MYPLC += plewww
394
395 #
396 # www-register-wizard
397 #
398 www-register-wizard-MODULES := www-register-wizard
399 www-register-wizard-SPEC := www-register-wizard.spec
400 ALL += www-register-wizard
401 IN_MYPLC += www-register-wizard
402
403 #
404 # pcucontrol
405 #
406 pcucontrol-MODULES := pcucontrol
407 pcucontrol-SPEC := pcucontrol.spec
408 ALL += pcucontrol
409
410 #
411 # monitor
412 #
413 monitor-MODULES := Monitor
414 monitor-SPEC := Monitor.spec
415 monitor-DEVEL-RPMS += net-snmp net-snmp-devel
416 ALL += monitor
417 IN_BOOTSTRAPFS += monitor
418
419 ### #
420 ### # zabbix
421 ### #
422 ### zabbix-MODULES := Monitor
423 ### zabbix-SPEC := zabbix.spec
424 ### zabbix-BUILD-FROM-SRPM := yes
425 ### zabbix-DEVEL-RPMS += python-cherrypy
426 ### ALL += zabbix
427 ### 
428 ### #
429 ### # PLC RT
430 ### #
431 ### plcrt-MODULES := PLCRT
432 ### plcrt-SPEC := plcrt.spec
433 ### ALL += plcrt
434
435 #
436 # pyopenssl
437 #
438 pyopenssl-MODULES := pyopenssl
439 pyopenssl-SPEC := pyOpenSSL.spec
440 pyopenssl-BUILD-FROM-SRPM := yes
441 ALL += pyopenssl
442
443 #
444 # pyaspects
445 #
446 pyaspects-MODULES := pyaspects
447 pyaspects-SPEC := pyaspects.spec
448 pyaspects-BUILD-FROM-SRPM := yes
449 ALL += pyaspects
450
451 ### #
452 ### # ejabberd
453 ### #
454 ### ejabberd-MODULES := ejabberd
455 ### ejabberd-SPEC := ejabberd.spec
456 ### ejabberd-BUILD-FROM-SRPM := yes
457 ### ejabberd-DEVEL-RPMS += erlang pam-devel hevea
458 ### # not needed anymore on f12 and above, that come with 2.1.5, and we had 2.1.3
459 ### # so, this is relevant on f8 and centos5 only
460 ### ifeq "$(DISTRONAME)" "$(filter $(DISTRONAME),f8 centos5)"
461 ### ALL += ejabberd
462 ### endif
463
464 ### # sfa now uses the with statement that's not supported on python-2.4 - not even through __future__
465 ### build_sfa=true
466 ### ifeq "$(DISTRONAME)" "centos5"
467 ### build_sfa=false
468 ### endif
469
470 ### ifeq "$(build_sfa)" "true"
471 ### #
472 ### # sfa - Slice Facility Architecture
473 ### #
474 ### sfa-MODULES := sfa
475 ### sfa-SPEC := sfa.spec
476 ### ALL += sfa
477 ### endif
478
479 ### sface-MODULES := sface
480 ### sface-SPEC := sface.spec
481 ### ALL += sface
482
483 #
484 # nodeconfig
485 #
486 nodeconfig-MODULES := nodeconfig
487 nodeconfig-SPEC := nodeconfig.spec
488 ALL += nodeconfig
489 IN_MYPLC += nodeconfig
490
491 #
492 # bootmanager
493 #
494 bootmanager-MODULES := bootmanager
495 bootmanager-SPEC := bootmanager.spec
496 ALL += bootmanager
497 IN_MYPLC += bootmanager
498
499 #
500 # pypcilib : used in bootcd
501
502 pypcilib-MODULES := pypcilib
503 pypcilib-SPEC := pypcilib.spec
504 ALL += pypcilib
505 IN_BOOTCD += pypcilib
506
507 #
508 # pyplnet
509 #
510 pyplnet-MODULES := pyplnet
511 pyplnet-SPEC := pyplnet.spec
512 ALL += pyplnet
513 IN_BOOTSTRAPFS += pyplnet
514 IN_MYPLC += pyplnet
515 IN_BOOTCD += pyplnet
516
517 #
518 # OMF resource controller
519 #
520 omf-resctl-MODULES := omf
521 omf-resctl-SPEC := omf-resctl.spec
522 ALL += omf-resctl
523 IN_VSERVER += omf-resctl
524
525 #
526 # OMF exp controller
527 #
528 omf-expctl-MODULES := omf
529 omf-expctl-SPEC := omf-expctl.spec
530 ALL += omf-expctl
531
532 #
533 # OML measurement library
534 #
535 oml-MODULES := oml
536 oml-DEVEL-RPMS += sqlite-devel 
537 oml-SPEC := liboml.spec
538 ALL += oml
539
540 #
541 # bootcd
542 #
543 bootcd-MODULES := bootcd build
544 bootcd-SPEC := bootcd.spec
545 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
546 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
547 bootcd-RPMDATE := yes
548 ALL += bootcd
549 IN_MYPLC += bootcd
550
551 #
552 # vserver : reference image for slices
553 #
554 vserver-MODULES := vserver-reference build
555 vserver-SPEC := vserver-reference.spec
556 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
557 vserver-DEPEND-FILES := RPMS/yumgroups.xml
558 vserver-RPMDATE := yes
559 ALL += vserver
560 IN_BOOTSTRAPFS += vserver
561
562 #
563 # bootstrapfs
564 #
565 bootstrapfs-MODULES := bootstrapfs build
566 bootstrapfs-SPEC := bootstrapfs.spec
567 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
568 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
569 bootstrapfs-RPMDATE := yes
570 ALL += bootstrapfs
571 IN_MYPLC += bootstrapfs
572
573 #
574 # noderepo
575 #
576 # all rpms resulting from packages marked as being in bootstrapfs and vserver
577 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER),$($(package).rpms))
578 # replace space with +++ (specvars cannot deal with spaces)
579 SPACE=$(subst x, ,x)
580 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
581
582 noderepo-MODULES := bootstrapfs
583 noderepo-SPEC := noderepo.spec
584 # package requires all embedded packages
585 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
586 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
587 #export rpm list to the specfile
588 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
589 noderepo-RPMDATE := yes
590 ALL += noderepo
591 IN_MYPLC += noderepo
592
593 #
594 # slicerepo
595 #
596 # all rpms resulting from packages marked as being in vserver
597 SLICEREPO_RPMS = $(foreach package,$(IN_VSERVER),$($(package).rpms))
598 # replace space with +++ (specvars cannot deal with spaces)
599 SPACE=$(subst x, ,x)
600 SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
601
602 slicerepo-MODULES := bootstrapfs
603 slicerepo-SPEC := slicerepo.spec
604 # package requires all embedded packages
605 slicerepo-DEPEND-PACKAGES := $(IN_VSERVER)
606 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
607 #export rpm list to the specfile
608 slicerepo-SPECVARS = slice_rpms_plus=$(SLICEREPO_RPMS_3PLUS)
609 slicerepo-RPMDATE := yes
610 ALL += slicerepo
611
612 #
613 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
614 #
615 myplc-MODULES := myplc
616 myplc-SPEC := myplc.spec
617 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
618 ALL += myplc
619
620 # myplc-docs only contains docs for PLCAPI and NMAPI, but
621 # we still need to pull MyPLC, as it is where the specfile lies, 
622 # together with the utility script docbook2drupal.sh
623 myplc-docs-MODULES := myplc plcapi nodemanager 
624 myplc-docs-SPEC := myplc-docs.spec
625 ALL += myplc-docs
626
627 # using some other name than myplc-release, as this is a make target already
628 release-MODULES := myplc
629 release-SPEC := myplc-release.spec
630 release-RPMDATE := yes
631 ALL += release