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