added info to build sge
[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 seg-BUILD-FROM-SRPM := yes
82 ALL += sge
83 IN_BOOTSTRAPFS += sge
84
85 #
86 # kernel
87 #
88 # use a package name with srpm in it:
89 # so the source rpm is created by running make srpm in the codebase
90 #
91
92 kernel-MODULES := linux-2.6
93 kernel-SPEC := kernel-2.6.spec
94 kernel-BUILD-FROM-SRPM := yes
95 ifeq "$(HOSTARCH)" "i386"
96 kernel-RPMFLAGS:= --target i686
97 else
98 kernel-RPMFLAGS:= --target $(HOSTARCH)
99 endif
100 ### not needed with 2.6.27 anymore
101 ### kernel-SPECVARS := iwlwifi=1
102 ### tmp
103 kernel-RPMDATE := yes
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 #
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 # util-vserver
132 #
133 util-vserver-MODULES := util-vserver
134 util-vserver-SPEC := util-vserver.spec
135 util-vserver-RPMFLAGS:= --without dietlibc
136 ALL += util-vserver
137 IN_BOOTSTRAPFS += util-vserver
138
139 #
140 # libnl - local import
141 # we need either 1.1 or at least 1.0.pre6
142 # rebuild this on centos5 - see kexcludes in build.common
143 #
144 local_libnl=false
145 ifeq "$(DISTRONAME)" "centos5"
146 local_libnl=true
147 endif
148
149 ifeq "$(local_libnl)" "true"
150 libnl-MODULES := libnl
151 libnl-SPEC := libnl.spec
152 libnl-BUILD-FROM-SRPM := yes
153 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
154 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
155 ALL += libnl
156 IN_BOOTSTRAPFS += libnl
157 endif
158
159 #
160 # util-vserver-pl
161 #
162 util-vserver-pl-MODULES := util-vserver-pl
163 util-vserver-pl-SPEC := util-vserver-pl.spec
164 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core 
165 ifeq "$(local_libnl)" "true"
166 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
167 endif
168 ALL += util-vserver-pl
169 IN_BOOTSTRAPFS += util-vserver-pl
170
171 #
172 # NodeUpdate
173 #
174 nodeupdate-MODULES := NodeUpdate
175 nodeupdate-SPEC := NodeUpdate.spec
176 ALL += nodeupdate
177 IN_BOOTSTRAPFS += nodeupdate
178
179 #
180 # ipod
181 #
182 ipod-MODULES := PingOfDeath
183 ipod-SPEC := ipod.spec
184 ALL += ipod
185 IN_BOOTSTRAPFS += ipod
186
187 #
188 # NodeManager
189 #
190 nodemanager-MODULES := NodeManager
191 nodemanager-SPEC := NodeManager.spec
192 ALL += nodemanager
193 IN_BOOTSTRAPFS += nodemanager
194
195 #
196 # pl_sshd
197 #
198 sshd-MODULES := pl_sshd
199 sshd-SPEC := pl_sshd.spec
200 ALL += sshd
201 IN_BOOTSTRAPFS += sshd
202
203 #
204 # codemux: Port 80 demux
205 #
206 codemux-MODULES := CoDemux
207 codemux-SPEC   := codemux.spec
208 codemux-RPMBUILD := sudo bash ./rpmbuild.sh
209 ALL += codemux
210 IN_BOOTSTRAPFS += codemux
211
212 #
213 # fprobe-ulog
214 #
215 fprobe-ulog-MODULES := fprobe-ulog
216 fprobe-ulog-SPEC := fprobe-ulog.spec
217 ALL += fprobe-ulog
218 IN_BOOTSTRAPFS += fprobe-ulog
219
220 #
221 # pf2slice
222 #
223 pf2slice-MODULES := pf2slice
224 pf2slice-SPEC := pf2slice.spec
225 ALL += pf2slice
226
227 #
228 # PlanetLab Mom: Cleans up your mess
229 #
230 mom-MODULES := Mom
231 mom-SPEC := pl_mom.spec
232 ALL += mom
233 IN_BOOTSTRAPFS += mom
234
235 #
236 # iptables
237 #
238 iptables-MODULES := iptables
239 iptables-SPEC := iptables.spec
240 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
241 ALL += iptables
242 IN_BOOTSTRAPFS += iptables
243
244 #
245 # iproute
246 #
247 iproute-MODULES := iproute2
248 iproute-SPEC := iproute.spec
249 ALL += iproute
250 IN_BOOTSTRAPFS += iproute
251 IN_VSERVER += iproute
252 IN_BOOTCD += iproute
253
254 #
255 # inotify-tools - local import
256 # rebuild this on centos5 (not found) - see kexcludes in build.common
257 #
258 local_inotify_tools=false
259 ifeq "$(DISTRONAME)" "centos5"
260 local_inotify_tools=true
261 endif
262
263 ifeq "$(local_inotify_tools)" "true"
264 inotify-tools-MODULES := inotify-tools
265 inotify-tools-SPEC := inotify-tools.spec
266 inotify-tools-BUILD-FROM-SRPM := yes
267 IN_BOOTSTRAPFS += inotify-tools
268 ALL += inotify-tools
269 endif
270
271 #
272 # vsys
273 #
274 vsys-MODULES := vsys
275 vsys-SPEC := vsys.spec
276 ifeq "$(local_inotify_tools)" "true"
277 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
278 endif
279 IN_BOOTSTRAPFS += vsys
280 ALL += vsys
281
282 #
283 # vsys-scripts
284 #
285 vsys-scripts-MODULES := vsys-scripts
286 vsys-scripts-SPEC := vsys-scripts.spec
287 IN_BOOTSTRAPFS += vsys-scripts
288 ALL += vsys-scripts
289
290 #
291 # PLCAPI
292 #
293 PLCAPI-MODULES := PLCAPI
294 PLCAPI-SPEC := PLCAPI.spec
295 ALL += PLCAPI
296 IN_MYPLC += PLCAPI
297
298 #
299 # drupal
300
301 drupal-MODULES := drupal
302 drupal-SPEC := drupal.spec
303 drupal-BUILD-FROM-SRPM := yes
304 ALL += drupal
305 IN_MYPLC += drupal
306
307 #
308 # use the plewww module instead
309 #
310 plewww-MODULES := PLEWWW
311 plewww-SPEC := plewww.spec
312 ALL += plewww
313 IN_MYPLC += plewww
314
315 #
316 # www-register-wizard
317 #
318 www-register-wizard-MODULES := www-register-wizard
319 www-register-wizard-SPEC := www-register-wizard.spec
320 ALL += www-register-wizard
321 IN_MYPLC += www-register-wizard
322
323 #
324 # monitor
325 #
326 monitor-MODULES := Monitor
327 monitor-SPEC := Monitor.spec
328 ALL += monitor
329 IN_BOOTSTRAPFS += monitor
330
331 #
332 # PLC RT
333 #
334 plcrt-MODULES := PLCRT
335 plcrt-SPEC := plcrt.spec
336 ALL += plcrt
337
338 #
339 # zabbix
340 #
341 zabbix-MODULES := Monitor
342 zabbix-SPEC := zabbix.spec
343 zabbix-BUILD-FROM-SRPM := yes
344 ALL += zabbix
345
346 #
347 # pyopenssl
348 #
349 pyopenssl-MODULES := pyopenssl
350 pyopenssl-SPEC := pyOpenSSL.spec
351 pyopenssl-BUILD-FROM-SRPM := yes
352 ALL += pyopenssl
353
354
355 #
356 # sfa - Slice Facility Architecture
357 #
358 sfa-MODULES := sfa
359 sfa-SPEC := sfa.spec
360 ALL += sfa
361
362 #
363 # nodeconfig
364 #
365 nodeconfig-MODULES := nodeconfig build
366 nodeconfig-SPEC := nodeconfig.spec
367 ALL += nodeconfig
368 IN_MYPLC += nodeconfig
369
370 #
371 # bootmanager
372 #
373 bootmanager-MODULES := BootManager
374 bootmanager-SPEC := bootmanager.spec
375 ALL += bootmanager
376 IN_MYPLC += bootmanager
377
378 #
379 # pypcilib : used in bootcd
380
381 pypcilib-MODULES := pypcilib
382 pypcilib-SPEC := pypcilib.spec
383 ALL += pypcilib
384 IN_BOOTCD += pypcilib
385
386 #
387 # pyplnet
388 #
389 pyplnet-MODULES := pyplnet
390 pyplnet-SPEC := pyplnet.spec
391 ALL += pyplnet
392 IN_BOOTSTRAPFS += pyplnet
393 IN_MYPLC += pyplnet
394 IN_BOOTCD += pyplnet
395
396 #
397 # bootcd
398 #
399 bootcd-MODULES := BootCD build
400 bootcd-SPEC := bootcd.spec
401 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
402 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
403 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
404 bootcd-RPMDATE := yes
405 ALL += bootcd
406 IN_MYPLC += bootcd
407
408 #
409 # vserver : reference image for slices
410 #
411 vserver-MODULES := VserverReference build
412 vserver-SPEC := vserver-reference.spec
413 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
414 vserver-DEPEND-FILES := RPMS/yumgroups.xml
415 vserver-RPMDATE := yes
416 ALL += vserver
417 IN_BOOTSTRAPFS += vserver
418
419 #
420 # bootstrapfs
421 #
422 bootstrapfs-MODULES := BootstrapFS build
423 bootstrapfs-SPEC := bootstrapfs.spec
424 bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
425 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
426 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
427 bootstrapfs-RPMDATE := yes
428 ALL += bootstrapfs
429 IN_MYPLC += bootstrapfs
430
431 #
432 # noderepo
433 #
434 # all rpms resulting from packages marked as being in bootstrapfs and vserver
435 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
436 # replace space with +++ (specvars cannot deal with spaces)
437 SPACE=$(subst x, ,x)
438 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
439
440 noderepo-MODULES := BootstrapFS 
441 noderepo-SPEC := noderepo.spec
442 noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
443 # package requires all regular packages
444 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
445 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
446 #export rpm list to the specfile
447 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
448 noderepo-RPMDATE := yes
449 ALL += noderepo
450 IN_MYPLC += noderepo
451
452 #
453 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
454 #
455 myplc-MODULES := MyPLC build 
456 myplc-SPEC := myplc.spec
457 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
458 ALL += myplc
459
460 # myplc-docs only contains docs for PLCAPI and NMAPI, but
461 # we still need to pull MyPLC, as it is where the specfile lies, 
462 # together with the utility script docbook2drupal.sh
463 myplc-docs-MODULES := MyPLC PLCAPI NodeManager Monitor
464 myplc-docs-SPEC := myplc-docs.spec
465 ALL += myplc-docs
466
467 # using some other name than myplc-release, as this is a make target already
468 release-MODULES := MyPLC
469 release-SPEC := myplc-release.spec
470 release-RPMDATE := yes
471 ALL += release