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