use myplc master for building the docs without monitor
[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 # madwifi
126 #
127 madwifi-MODULES := madwifi
128 madwifi-SPEC := madwifi.spec
129 madwifi-BUILD-FROM-SRPM := yes
130 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
131 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
132         kernel_release=$(kernel.rpm-release) \
133         kernel_arch=$(kernel.rpm-arch)
134 ALL += madwifi
135 IN_BOOTSTRAPFS += madwifi
136
137 #
138 # iptables
139 #
140 iptables-MODULES := iptables
141 iptables-SPEC := iptables.spec
142 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
143 ALL += iptables
144 IN_BOOTSTRAPFS += iptables
145
146 #
147 # iproute
148 #
149 iproute-MODULES := iproute2
150 iproute-SPEC := iproute.spec
151 ALL += iproute
152 IN_BOOTSTRAPFS += iproute
153 IN_VSERVER += iproute
154 IN_BOOTCD += iproute
155
156 #
157 # ipfw: root context module, and slice companion
158 #
159 ipfwroot-MODULES := ipfw
160 ipfwroot-SPEC := planetlab/ipfwroot.spec
161 ipfwroot-DEPEND-DEVEL-RPMS := kernel-devel
162 ipfwroot-SPECVARS = kernel_version=$(kernel.rpm-version) \
163         kernel_release=$(kernel.rpm-release) \
164         kernel_arch=$(kernel.rpm-arch)
165 ALL += ipfwroot
166
167 ipfwslice-MODULES := ipfw
168 ipfwslice-SPEC := planetlab/ipfwslice.spec
169 ipfwslice-SPECVARS = kernel_version=$(kernel.rpm-version) \
170         kernel_release=$(kernel.rpm-release) \
171         kernel_arch=$(kernel.rpm-arch)
172 ALL += ipfwslice
173
174 #
175 # umts: root context stuff
176 #
177 umts-backend-MODULES := planetlab-umts-tools
178 umts-backend-SPEC := backend.spec
179 IN_BOOTSTRAPFS += umts-backend
180 ALL += umts-backend
181
182 #
183 # umts: slice tools
184 #
185 umts-frontend-MODULES := planetlab-umts-tools
186 umts-frontend-SPEC := frontend.spec
187 IN_VSERVER += umts-frontend
188 ALL += umts-frontend
189
190 #
191 # util-vserver
192 #
193 util-vserver-MODULES := util-vserver
194 util-vserver-SPEC := util-vserver.spec
195 util-vserver-RPMFLAGS:= --without dietlibc
196 ALL += util-vserver
197 IN_BOOTSTRAPFS += util-vserver
198
199 #
200 # libnl - local import
201 # we need either 1.1 or at least 1.0.pre6
202 # rebuild this on centos5 - see kexcludes in build.common
203 #
204 local_libnl=false
205 ifeq "$(DISTRONAME)" "centos5"
206 local_libnl=true
207 endif
208
209 ifeq "$(local_libnl)" "true"
210 libnl-MODULES := libnl
211 libnl-SPEC := libnl.spec
212 libnl-BUILD-FROM-SRPM := yes
213 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
214 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
215 ALL += libnl
216 IN_BOOTSTRAPFS += libnl
217 endif
218
219 #
220 # util-vserver-pl
221 #
222 util-vserver-pl-MODULES := util-vserver-pl
223 util-vserver-pl-SPEC := util-vserver-pl.spec
224 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core 
225 ifeq "$(local_libnl)" "true"
226 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
227 endif
228 ALL += util-vserver-pl
229 IN_BOOTSTRAPFS += util-vserver-pl
230
231 #
232 # NodeUpdate
233 #
234 nodeupdate-MODULES := nodeupdate
235 nodeupdate-SPEC := NodeUpdate.spec
236 ALL += nodeupdate
237 IN_BOOTSTRAPFS += nodeupdate
238
239 #
240 # ipod
241 #
242 ipod-MODULES := PingOfDeath
243 ipod-SPEC := ipod.spec
244 ALL += ipod
245 IN_BOOTSTRAPFS += ipod
246
247 #
248 # NodeManager
249 #
250 nodemanager-MODULES := nodemanager
251 nodemanager-SPEC := NodeManager.spec
252 ALL += nodemanager
253 IN_BOOTSTRAPFS += nodemanager
254
255 #
256 # pl_sshd
257 #
258 sshd-MODULES := pl_sshd
259 sshd-SPEC := pl_sshd.spec
260 ALL += sshd
261 IN_BOOTSTRAPFS += sshd
262
263 #
264 # codemux: Port 80 demux
265 #
266 codemux-MODULES := codemux
267 codemux-SPEC   := codemux.spec
268 ALL += codemux
269 IN_BOOTSTRAPFS += codemux
270
271 #
272 # fprobe-ulog
273 #
274 fprobe-ulog-MODULES := fprobe-ulog
275 fprobe-ulog-SPEC := fprobe-ulog.spec
276 ALL += fprobe-ulog
277 IN_BOOTSTRAPFS += fprobe-ulog
278
279 #
280 # pf2slice
281 #
282 pf2slice-MODULES := pf2slice
283 pf2slice-SPEC := pf2slice.spec
284 ALL += pf2slice
285
286 #
287 # PlanetLab Mom: Cleans up your mess
288 #
289 mom-MODULES := Mom
290 mom-SPEC := pl_mom.spec
291 ALL += mom
292 IN_BOOTSTRAPFS += mom
293
294 #
295 # inotify-tools - local import
296 # rebuild this on centos5 (not found) - see kexcludes in build.common
297 #
298 local_inotify_tools=false
299 ifeq "$(DISTRONAME)" "centos5"
300 local_inotify_tools=true
301 endif
302
303 ifeq "$(local_inotify_tools)" "true"
304 inotify-tools-MODULES := inotify-tools
305 inotify-tools-SPEC := inotify-tools.spec
306 inotify-tools-BUILD-FROM-SRPM := yes
307 IN_BOOTSTRAPFS += inotify-tools
308 ALL += inotify-tools
309 endif
310
311 #
312 # vsys
313 #
314 vsys-MODULES := vsys
315 vsys-SPEC := vsys.spec
316 vsys-DEVEL-RPMS += ocaml-docs ocaml-ocamldoc
317 ifeq "$(local_inotify_tools)" "true"
318 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
319 endif
320 IN_BOOTSTRAPFS += vsys
321 ALL += vsys
322
323 #
324 # vsys-scripts
325 #
326 vsys-scripts-MODULES := vsys-scripts
327 vsys-scripts-SPEC := vsys-scripts.spec
328 IN_BOOTSTRAPFS += vsys-scripts
329 ALL += vsys-scripts
330
331 #
332 # PLCAPI
333 #
334 plcapi-MODULES := plcapi
335 plcapi-SPEC := PLCAPI.spec
336 ALL += plcapi
337 IN_MYPLC += plcapi
338
339 #
340 # drupal
341
342 drupal-MODULES := drupal
343 drupal-SPEC := drupal.spec
344 drupal-BUILD-FROM-SRPM := yes
345 ALL += drupal
346 IN_MYPLC += drupal
347
348 #
349 # use the plewww module instead
350 #
351 plewww-MODULES := plewww
352 plewww-SPEC := plewww.spec
353 ALL += plewww
354 IN_MYPLC += plewww
355
356 #
357 # www-register-wizard
358 #
359 www-register-wizard-MODULES := www-register-wizard
360 www-register-wizard-SPEC := www-register-wizard.spec
361 ALL += www-register-wizard
362 IN_MYPLC += www-register-wizard
363
364 #
365 # pcucontrol
366 #
367 pcucontrol-MODULES := pcucontrol
368 pcucontrol-SPEC := pcucontrol.spec
369 ALL += pcucontrol
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 # nodeconfig
389 #
390 nodeconfig-MODULES := nodeconfig
391 nodeconfig-SPEC := nodeconfig.spec
392 ALL += nodeconfig
393 IN_MYPLC += nodeconfig
394
395 #
396 # bootmanager
397 #
398 bootmanager-MODULES := bootmanager
399 bootmanager-SPEC := bootmanager.spec
400 ALL += bootmanager
401 IN_MYPLC += bootmanager
402
403 #
404 # pypcilib : used in bootcd
405
406 pypcilib-MODULES := pypcilib
407 pypcilib-SPEC := pypcilib.spec
408 ALL += pypcilib
409 IN_BOOTCD += pypcilib
410
411 #
412 # pyplnet
413 #
414 pyplnet-MODULES := pyplnet
415 pyplnet-SPEC := pyplnet.spec
416 ALL += pyplnet
417 IN_BOOTSTRAPFS += pyplnet
418 IN_MYPLC += pyplnet
419 IN_BOOTCD += pyplnet
420
421 #
422 # bootcd
423 #
424 bootcd-MODULES := bootcd build
425 bootcd-SPEC := bootcd.spec
426 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
427 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
428 bootcd-RPMDATE := yes
429 ALL += bootcd
430 IN_MYPLC += bootcd
431
432 #
433 # vserver : reference image for slices
434 #
435 vserver-MODULES := vserver-reference build
436 vserver-SPEC := vserver-reference.spec
437 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
438 vserver-DEPEND-FILES := RPMS/yumgroups.xml
439 vserver-RPMDATE := yes
440 ALL += vserver
441 IN_BOOTSTRAPFS += vserver
442
443 #
444 # bootstrapfs
445 #
446 bootstrapfs-MODULES := bootstrapfs build
447 bootstrapfs-SPEC := bootstrapfs.spec
448 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
449 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
450 bootstrapfs-RPMDATE := yes
451 ALL += bootstrapfs
452 IN_MYPLC += bootstrapfs
453
454 #
455 # noderepo
456 #
457 # all rpms resulting from packages marked as being in bootstrapfs and vserver
458 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
459 # replace space with +++ (specvars cannot deal with spaces)
460 SPACE=$(subst x, ,x)
461 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
462
463 noderepo-MODULES := bootstrapfs 
464 noderepo-SPEC := noderepo.spec
465 # package requires all regular packages
466 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
467 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
468 #export rpm list to the specfile
469 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
470 noderepo-RPMDATE := yes
471 ALL += noderepo
472 IN_MYPLC += noderepo
473
474 #
475 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
476 #
477 myplc-MODULES := myplc
478 myplc-SPEC := myplc.spec
479 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
480 ALL += myplc
481
482 # myplc-docs only contains docs for PLCAPI and NMAPI, but
483 # we still need to pull MyPLC, as it is where the specfile lies, 
484 # together with the utility script docbook2drupal.sh
485 myplc-docs-MODULES := myplc plcapi nodemanager 
486 myplc-docs-SPEC := myplc-docs.spec
487 ALL += myplc-docs
488
489 # using some other name than myplc-release, as this is a make target already
490 release-MODULES := myplc
491 release-SPEC := myplc-release.spec
492 release-RPMDATE := yes
493 ALL += release