add pcucontrol. build monitor and myplc from trunk
[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 # pcucontrol
317 #
318 pcucontrol-MODULES := pcucontrol
319 pcucontrol-SPEC := pcucontrol.spec
320 ALL += pcucontrol
321
322 #
323 # monitor
324 #
325 monitor-MODULES := Monitor
326 monitor-SPEC := Monitor.spec
327 ALL += monitor
328 ###xxx-tmp-off IN_BOOTSTRAPFS += monitor
329
330 #
331 # PLC RT
332 #
333 plcrt-MODULES := PLCRT
334 plcrt-SPEC := plcrt.spec
335 ###xxx-tmp-off ALL += plcrt
336
337 #
338 # zabbix
339 #
340 zabbix-MODULES := Monitor
341 zabbix-SPEC := zabbix.spec
342 zabbix-BUILD-FROM-SRPM := yes
343 ###xxx-tmp-off ALL += zabbix
344
345 #
346 # pyopenssl
347 #
348 pyopenssl-MODULES := pyopenssl
349 pyopenssl-SPEC := pyOpenSSL.spec
350 pyopenssl-BUILD-FROM-SRPM := yes
351 ALL += pyopenssl
352
353
354 #
355 # sfa - Slice Facility Architecture
356 #
357 sfa-MODULES := sfa
358 sfa-SPEC := sfa.spec
359 ALL += sfa
360
361 #
362 # nodeconfig
363 #
364 nodeconfig-MODULES := nodeconfig build
365 nodeconfig-SPEC := nodeconfig.spec
366 ALL += nodeconfig
367 IN_MYPLC += nodeconfig
368
369 #
370 # bootmanager
371 #
372 bootmanager-MODULES := BootManager
373 bootmanager-SPEC := bootmanager.spec
374 ALL += bootmanager
375 IN_MYPLC += bootmanager
376
377 #
378 # pypcilib : used in bootcd
379
380 pypcilib-MODULES := pypcilib
381 pypcilib-SPEC := pypcilib.spec
382 ALL += pypcilib
383 IN_BOOTCD += pypcilib
384
385 #
386 # pyplnet
387 #
388 pyplnet-MODULES := pyplnet
389 pyplnet-SPEC := pyplnet.spec
390 ALL += pyplnet
391 IN_BOOTSTRAPFS += pyplnet
392 IN_MYPLC += pyplnet
393 IN_BOOTCD += pyplnet
394
395 #
396 # bootcd
397 #
398 bootcd-MODULES := BootCD build
399 bootcd-SPEC := bootcd.spec
400 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
401 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
402 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
403 bootcd-RPMDATE := yes
404 ALL += bootcd
405 IN_MYPLC += bootcd
406
407 #
408 # vserver : reference image for slices
409 #
410 vserver-MODULES := VserverReference build
411 vserver-SPEC := vserver-reference.spec
412 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
413 vserver-DEPEND-FILES := RPMS/yumgroups.xml
414 vserver-RPMDATE := yes
415 ALL += vserver
416 IN_BOOTSTRAPFS += vserver
417
418 #
419 # bootstrapfs
420 #
421 bootstrapfs-MODULES := BootstrapFS build
422 bootstrapfs-SPEC := bootstrapfs.spec
423 bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
424 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
425 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
426 bootstrapfs-RPMDATE := yes
427 ALL += bootstrapfs
428 IN_MYPLC += bootstrapfs
429
430 #
431 # noderepo
432 #
433 # all rpms resulting from packages marked as being in bootstrapfs and vserver
434 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
435 # replace space with +++ (specvars cannot deal with spaces)
436 SPACE=$(subst x, ,x)
437 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
438
439 noderepo-MODULES := BootstrapFS 
440 noderepo-SPEC := noderepo.spec
441 noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
442 # package requires all regular packages
443 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
444 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
445 #export rpm list to the specfile
446 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
447 noderepo-RPMDATE := yes
448 ALL += noderepo
449 IN_MYPLC += noderepo
450
451 #
452 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
453 #
454 myplc-MODULES := MyPLC build 
455 myplc-SPEC := myplc.spec
456 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
457 ALL += myplc
458
459 # myplc-docs only contains docs for PLCAPI and NMAPI, but
460 # we still need to pull MyPLC, as it is where the specfile lies, 
461 # together with the utility script docbook2drupal.sh
462 myplc-docs-MODULES := MyPLC PLCAPI NodeManager Monitor
463 myplc-docs-SPEC := myplc-docs.spec
464 ALL += myplc-docs
465
466 # using some other name than myplc-release, as this is a make target already
467 release-MODULES := MyPLC
468 release-SPEC := myplc-release.spec
469 release-RPMDATE := yes
470 ALL += release