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