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