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