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