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