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