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