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
8 # $Id: onelab.mk 13559 2009-05-20 13:30:42Z baris $
16 # use a package name with srpm in it:
17 # so the source rpm is created by running make srpm in the codebase
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
26 kernel-RPMFLAGS:= --target $(HOSTARCH)
28 # this is useful for 2.6.22 but will not be needed anymore with 2.6.27
29 kernel-SPECVARS := iwlwifi=1
33 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
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)
46 madwifi-MODULES := madwifi
47 madwifi-SPEC := madwifi.spec
48 madwifi-BUILD-FROM-SRPM := yes
49 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
50 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
51 kernel_release=$(kernel.rpm-release) \
52 kernel_arch=$(kernel.rpm-arch)
54 IN_BOOTSTRAPFS += madwifi
60 ipfw-SPEC := ipfw.spec
61 ipfw-DEPEND-DEVEL-RPMS := kernel-devel
62 ipfw-SPECVARS = kernel_version=$(kernel.rpm-version) \
63 kernel_release=$(kernel.rpm-release) \
64 kernel_arch=$(kernel.rpm-arch)
65 IN_BOOTSTRAPFS += ipfw
71 nozomi-MODULES := nozomi
72 nozomi-SPEC := nozomi.spec
73 nozomi-DEPEND-DEVEL-RPMS := kernel-devel
74 nozomi-SPECVARS = kernel_version=$(kernel.rpm-version) \
75 kernel_release=$(kernel.rpm-release) \
76 kernel_arch=$(kernel.rpm-arch)
77 IN_BOOTSTRAPFS += nozomi
83 comgt-MODULES := comgt
84 comgt-SPEC := comgt.spec
85 IN_BOOTSTRAPFS += comgt
89 # umts: root context stuff
91 umts-backend-MODULES := planetlab-umts-tools
92 umts-backend-SPEC := backend.spec
93 IN_BOOTSTRAPFS += umts-backend
99 umts-frontend-MODULES := planetlab-umts-tools
100 umts-frontend-SPEC := frontend.spec
101 IN_VSERVER += umts-frontend
107 util-vserver-MODULES := util-vserver
108 util-vserver-SPEC := util-vserver.spec
109 util-vserver-RPMFLAGS:= --without dietlibc
111 IN_BOOTSTRAPFS += util-vserver
114 # libnl - local import
115 # we need either 1.1 or at least 1.0.pre6
116 # rebuild this on centos5 - see kexcludes in build.common
119 ifeq "$(DISTRONAME)" "centos5"
123 ifeq "$(local_libnl)" "true"
124 libnl-MODULES := libnl
125 libnl-SPEC := libnl.spec
126 libnl-BUILD-FROM-SRPM := yes
127 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
128 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
130 IN_BOOTSTRAPFS += libnl
136 util-vserver-pl-MODULES := util-vserver-pl
137 util-vserver-pl-SPEC := util-vserver-pl.spec
138 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core
139 ifeq "$(local_libnl)" "true"
140 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
142 ALL += util-vserver-pl
143 IN_BOOTSTRAPFS += util-vserver-pl
148 nodeupdate-MODULES := NodeUpdate
149 nodeupdate-SPEC := NodeUpdate.spec
151 IN_BOOTSTRAPFS += nodeupdate
156 ipod-MODULES := PingOfDeath
157 ipod-SPEC := ipod.spec
159 IN_BOOTSTRAPFS += ipod
164 nodemanager-MODULES := NodeManager
165 nodemanager-SPEC := NodeManager.spec
167 IN_BOOTSTRAPFS += nodemanager
172 sshd-MODULES := pl_sshd
173 sshd-SPEC := pl_sshd.spec
175 IN_BOOTSTRAPFS += sshd
178 # codemux: Port 80 demux
180 codemux-MODULES := CoDemux
181 codemux-SPEC := codemux.spec
182 codemux-RPMBUILD := sudo bash ./rpmbuild.sh
184 IN_BOOTSTRAPFS += codemux
189 fprobe-ulog-MODULES := fprobe-ulog
190 fprobe-ulog-SPEC := fprobe-ulog.spec
192 IN_BOOTSTRAPFS += fprobe-ulog
197 pf2slice-MODULES := pf2slice
198 pf2slice-SPEC := pf2slice.spec
202 # PlanetLab Mom: Cleans up your mess
205 mom-SPEC := pl_mom.spec
207 IN_BOOTSTRAPFS += mom
212 iptables-MODULES := iptables
213 iptables-SPEC := iptables.spec
214 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
216 IN_BOOTSTRAPFS += iptables
221 iproute-MODULES := iproute2
222 iproute-SPEC := iproute.spec
224 IN_BOOTSTRAPFS += iproute
225 IN_VSERVER += iproute
229 # inotify-tools - local import
230 # rebuild this on centos5 (not found) - see kexcludes in build.common
232 local_inotify_tools=false
233 ifeq "$(DISTRONAME)" "centos5"
234 local_inotify_tools=true
237 ifeq "$(local_inotify_tools)" "true"
238 inotify-tools-MODULES := inotify-tools
239 inotify-tools-SPEC := inotify-tools.spec
240 inotify-tools-BUILD-FROM-SRPM := yes
241 IN_BOOTSTRAPFS += inotify-tools
249 vsys-SPEC := vsys.spec
250 ifeq "$(local_inotify_tools)" "true"
251 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
253 IN_BOOTSTRAPFS += vsys
259 vsys-scripts-MODULES := vsys-scripts
260 vsys-scripts-SPEC := vsys-scripts.spec
261 IN_BOOTSTRAPFS += vsys-scripts
267 dummynet_image-MODULES := dummynet_image
268 dummynet_image-SPEC := dummynet_image.spec
269 IN_MYPLC += dummynet_image
270 ALL += dummynet_image
275 PLCAPI-MODULES := PLCAPI
276 PLCAPI-SPEC := PLCAPI.spec
283 drupal-MODULES := drupal
284 drupal-SPEC := drupal.spec
285 drupal-BUILD-FROM-SRPM := yes
290 # use the plewww module instead
292 plewww-MODULES := PLEWWW
293 plewww-SPEC := plewww.spec
298 # www-register-wizard
300 www-register-wizard-MODULES := www-register-wizard
301 www-register-wizard-SPEC := www-register-wizard.spec
302 ALL += www-register-wizard
303 IN_MYPLC += www-register-wizard
308 monitor-MODULES := Monitor
309 monitor-SPEC := Monitor.spec
311 IN_BOOTSTRAPFS += monitor
316 zabbix-MODULES := Monitor
317 zabbix-SPEC := zabbix.spec
318 zabbix-BUILD-FROM-SRPM := yes
324 pyopenssl-MODULES := pyopenssl
325 pyopenssl-SPEC := pyOpenSSL.spec
326 pyopenssl-BUILD-FROM-SRPM := yes
331 # sfa - Slice Facility Architecture - fka geniwrapper
334 sfa-SPEC := geniwrapper.spec
340 nodeconfig-MODULES := nodeconfig build
341 nodeconfig-SPEC := nodeconfig.spec
343 IN_MYPLC += nodeconfig
348 bootmanager-MODULES := BootManager
349 bootmanager-SPEC := bootmanager.spec
351 IN_MYPLC += bootmanager
354 # pypcilib : used in bootcd
356 pypcilib-MODULES := pypcilib
357 pypcilib-SPEC := pypcilib.spec
359 IN_BOOTCD += pypcilib
364 pyplnet-MODULES := pyplnet
365 pyplnet-SPEC := pyplnet.spec
367 IN_BOOTSTRAPFS += pyplnet
374 bootcd-MODULES := BootCD build
375 bootcd-SPEC := bootcd.spec
376 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
377 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
378 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
379 bootcd-RPMDATE := yes
384 # vserver : reference image for slices
386 vserver-MODULES := VserverReference build
387 vserver-SPEC := vserver-reference.spec
388 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
389 vserver-DEPEND-FILES := RPMS/yumgroups.xml
390 vserver-RPMDATE := yes
392 IN_BOOTSTRAPFS += vserver
397 bootstrapfs-MODULES := BootstrapFS build
398 bootstrapfs-SPEC := bootstrapfs.spec
399 bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
400 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
401 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
402 bootstrapfs-RPMDATE := yes
404 IN_MYPLC += bootstrapfs
409 # all rpms resulting from packages marked as being in bootstrapfs and vserver
410 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
411 # replace space with +++ (specvars cannot deal with spaces)
413 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
415 noderepo-MODULES := BootstrapFS
416 noderepo-SPEC := noderepo.spec
417 noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
418 # package requires all regular packages
419 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
420 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
421 #export rpm list to the specfile
422 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
423 noderepo-RPMDATE := yes
428 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
430 myplc-MODULES := MyPLC build
431 myplc-SPEC := myplc.spec
432 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
435 # myplc-docs only contains docs for PLCAPI and NMAPI, but
436 # we still need to pull MyPLC, as it is where the specfile lies,
437 # together with the utility script docbook2drupal.sh
438 myplc-docs-MODULES := MyPLC PLCAPI NodeManager Monitor
439 myplc-docs-SPEC := myplc-docs.spec
442 # using some other name than myplc-release, as this is a make target already
443 release-MODULES := MyPLC
444 release-SPEC := myplc-release.spec
445 release-RPMDATE := yes