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