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