cleanup
[build.git] / planetlab.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 KERNELS += kernel
29
30 kernels: $(KERNELS)
31 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
32
33 ALL += $(KERNELS)
34 # this is to mark on which image a given rpm is supposed to go
35 IN_BOOTCD += $(KERNELS)
36 IN_VSERVER += $(KERNELS)
37 IN_BOOTSTRAPFS += $(KERNELS)
38 # turns out myplc installs kernel-vserver
39 IN_MYPLC += $(KERNELS)
40
41 #
42 # madwifi
43 #
44 madwifi-MODULES := madwifi
45 madwifi-SPEC := madwifi.spec
46 madwifi-BUILD-FROM-SRPM := yes
47 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
48 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
49         kernel_release=$(kernel.rpm-release) \
50         kernel_arch=$(kernel.rpm-arch)
51 ALL += madwifi
52 IN_BOOTSTRAPFS += madwifi
53
54 #
55 # util-vserver
56 #
57 util-vserver-MODULES := util-vserver
58 util-vserver-SPEC := util-vserver.spec
59 util-vserver-RPMFLAGS:= --without dietlibc
60 ALL += util-vserver
61 IN_BOOTSTRAPFS += util-vserver
62
63 #
64 # libnl - local import
65 # we need either 1.1 or at least 1.0.pre6
66 # rebuild this on centos5 - see kexcludes in build.common
67 #
68 local_libnl=false
69 ifeq "$(DISTRONAME)" "centos5"
70 local_libnl=true
71 endif
72
73 ifeq "$(local_libnl)" "true"
74 libnl-MODULES := libnl
75 libnl-SPEC := libnl.spec
76 libnl-BUILD-FROM-SRPM := yes
77 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
78 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
79 ALL += libnl
80 IN_BOOTSTRAPFS += libnl
81 endif
82
83 #
84 # util-vserver-pl
85 #
86 util-vserver-pl-MODULES := util-vserver-pl
87 util-vserver-pl-SPEC := util-vserver-pl.spec
88 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core 
89 ifeq "$(local_libnl)" "true"
90 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
91 endif
92 ALL += util-vserver-pl
93 IN_BOOTSTRAPFS += util-vserver-pl
94
95 #
96 # NodeUpdate
97 #
98 nodeupdate-MODULES := NodeUpdate
99 nodeupdate-SPEC := NodeUpdate.spec
100 ALL += nodeupdate
101 IN_BOOTSTRAPFS += nodeupdate
102
103 #
104 # ipod
105 #
106 ipod-MODULES := PingOfDeath
107 ipod-SPEC := ipod.spec
108 ALL += ipod
109 IN_BOOTSTRAPFS += ipod
110
111 #
112 # NodeManager
113 #
114 nodemanager-MODULES := NodeManager
115 nodemanager-SPEC := NodeManager.spec
116 ALL += nodemanager
117 IN_BOOTSTRAPFS += nodemanager
118
119 #
120 # pl_sshd
121 #
122 sshd-MODULES := pl_sshd
123 sshd-SPEC := pl_sshd.spec
124 ALL += sshd
125 IN_BOOTSTRAPFS += sshd
126
127 #
128 # codemux: Port 80 demux
129 #
130 codemux-MODULES := CoDemux
131 codemux-SPEC   := codemux.spec
132 codemux-RPMBUILD := sudo bash ./rpmbuild.sh
133 ALL += codemux
134 IN_BOOTSTRAPFS += codemux
135
136 #
137 # fprobe-ulog
138 #
139 fprobe-ulog-MODULES := fprobe-ulog
140 fprobe-ulog-SPEC := fprobe-ulog.spec
141 ALL += fprobe-ulog
142 IN_BOOTSTRAPFS += fprobe-ulog
143
144 #
145 # pf2slice
146 #
147 pf2slice-MODULES := pf2slice
148 pf2slice-SPEC := pf2slice.spec
149 ALL += pf2slice
150
151 #
152 # PlanetLab Mom: Cleans up your mess
153 #
154 mom-MODULES := Mom
155 mom-SPEC := pl_mom.spec
156 ALL += mom
157 IN_BOOTSTRAPFS += mom
158
159 #
160 # iptables
161 #
162 iptables-MODULES := iptables
163 iptables-SPEC := iptables.spec
164 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
165 ALL += iptables
166 IN_BOOTSTRAPFS += iptables
167
168 #
169 # iproute
170 #
171 iproute-MODULES := iproute2
172 iproute-SPEC := iproute.spec
173 ALL += iproute
174 IN_BOOTSTRAPFS += iproute
175 IN_VSERVER += iproute
176 IN_BOOTCD += iproute
177
178 #
179 # inotify-tools - local import
180 # rebuild this on centos5 (not found) - see kexcludes in build.common
181 #
182 local_inotify_tools=false
183 ifeq "$(DISTRONAME)" "centos5"
184 local_inotify_tools=true
185 endif
186
187 ifeq "$(local_inotify_tools)" "true"
188 inotify-tools-MODULES := inotify-tools
189 inotify-tools-SPEC := inotify-tools.spec
190 inotify-tools-BUILD-FROM-SRPM := yes
191 IN_BOOTSTRAPFS += inotify-tools
192 ALL += inotify-tools
193 endif
194
195 #
196 # vsys
197 #
198 vsys-MODULES := vsys
199 vsys-SPEC := vsys.spec
200 ifeq "$(local_inotify_tools)" "true"
201 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
202 endif
203 IN_BOOTSTRAPFS += vsys
204 ALL += vsys
205
206 #
207 # PLCAPI
208 #
209 PLCAPI-MODULES := PLCAPI
210 PLCAPI-SPEC := PLCAPI.spec
211 ALL += PLCAPI
212 IN_MYPLC += PLCAPI
213
214 #
215 # drupal
216
217 drupal-MODULES := drupal
218 drupal-SPEC := drupal.spec
219 drupal-BUILD-FROM-SRPM := yes
220 ALL += drupal
221 IN_MYPLC += drupal
222
223 #
224 # use the plewww module instead
225 #
226 plewww-MODULES := PLEWWW
227 plewww-SPEC := plewww.spec
228 ALL += plewww
229 IN_MYPLC += plewww
230
231 #
232 # www-register-wizard
233 #
234 www-register-wizard-MODULES := www-register-wizard
235 www-register-wizard-SPEC := www-register-wizard.spec
236 ALL += www-register-wizard
237 IN_MYPLC += www-register-wizard
238
239 #
240 # monitor
241 #
242 monitor-MODULES := Monitor
243 monitor-SPEC := Monitor.spec
244 ALL += monitor
245 IN_BOOTSTRAPFS += monitor
246
247 #
248 # zabbix
249 #
250 zabbix-MODULES := Monitor
251 zabbix-SPEC := zabbix.spec
252 zabbix-BUILD-FROM-SRPM := yes
253 ALL += zabbix
254
255 #
256 # nodeconfig
257 #
258 nodeconfig-MODULES := nodeconfig build
259 nodeconfig-SPEC := nodeconfig.spec
260 ALL += nodeconfig
261 IN_MYPLC += nodeconfig
262
263 #
264 # bootmanager
265 #
266 bootmanager-MODULES := BootManager
267 bootmanager-SPEC := bootmanager.spec
268 ALL += bootmanager
269 IN_MYPLC += bootmanager
270
271 #
272 # pypcilib : used in bootcd
273
274 pypcilib-MODULES := pypcilib
275 pypcilib-SPEC := pypcilib.spec
276 ALL += pypcilib
277 IN_BOOTCD += pypcilib
278
279 #
280 # pyplnet
281 #
282 pyplnet-MODULES := pyplnet
283 pyplnet-SPEC := pyplnet.spec
284 ALL += pyplnet
285 IN_BOOTSTRAPFS += pyplnet
286 IN_MYPLC += pyplnet
287 IN_BOOTCD += pyplnet
288
289 #
290 # bootcd
291 #
292 bootcd-MODULES := BootCD build
293 bootcd-SPEC := bootcd.spec
294 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
295 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
296 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
297 bootcd-RPMDATE := yes
298 ALL += bootcd
299 IN_MYPLC += bootcd
300
301 #
302 # vserver : reference image for slices
303 #
304 vserver-MODULES := VserverReference build
305 vserver-SPEC := vserver-reference.spec
306 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
307 vserver-DEPEND-FILES := RPMS/yumgroups.xml
308 vserver-RPMDATE := yes
309 ALL += vserver
310 IN_BOOTSTRAPFS += vserver
311
312 #
313 # bootstrapfs
314 #
315 bootstrapfs-MODULES := BootstrapFS build
316 bootstrapfs-SPEC := bootstrapfs.spec
317 bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
318 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
319 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
320 bootstrapfs-RPMDATE := yes
321 ALL += bootstrapfs
322 IN_MYPLC += bootstrapfs
323
324 #
325 # noderepo
326 #
327 # all rpms resulting from packages marked as being in bootstrapfs and vserver
328 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
329 # replace space with +++ (specvars cannot deal with spaces)
330 SPACE=$(subst x, ,x)
331 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
332
333 noderepo-MODULES := BootstrapFS 
334 noderepo-SPEC := noderepo.spec
335 noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
336 # package requires all regular packages
337 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
338 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
339 #export rpm list to the specfile
340 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
341 noderepo-RPMDATE := yes
342 ALL += noderepo
343 IN_MYPLC += noderepo
344
345 #
346 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
347 #
348 myplc-MODULES := MyPLC build 
349 myplc-SPEC := myplc.spec
350 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
351 ALL += myplc
352
353 ## #
354 ## # myplc-chroot : old-fashioned, chroot-based packaging
355 ## #
356 ## myplc-chroot-MODULES := MyPLC build
357 ## myplc-chroot-SPEC := myplc-chroot.spec
358 ## # myplc-chroot may require all packages
359 ## myplc-chroot-DEPEND-PACKAGES := $(IN_MYPLC)
360 ## myplc-chroot-DEPEND-FILES := RPMS/yumgroups.xml myplc-release
361 ## myplc-chroot-RPMDATE := yes
362 ## ALL += myplc-chroot
363
364 # myplc-docs only contains docs for PLCAPI and NMAPI, but
365 # we still need to pull MyPLC, as it is where the specfile lies, 
366 # together with the utility script docbook2drupal.sh
367 myplc-docs-MODULES := MyPLC PLCAPI NodeManager
368 myplc-docs-SPEC := myplc-docs.spec
369 ALL += myplc-docs
370
371 # using some other name than myplc-release, as this is a make target already
372 release-MODULES := MyPLC
373 release-SPEC := myplc-release.spec
374 release-RPMDATE := yes
375 ALL += release