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