added dependency, for when building only vserver (e.g. for centOS)
[build.git] / planetlab.mk
1 #
2 # PlanetLab standard components list
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 # kexec-tools
43 #
44 ifeq "$(DISTRONAME)" "fc4"
45 kexec-tools-MODULES := kexec-tools
46 kexec-tools-SPEC := kexec-tools.spec
47 kexec-tools-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
48 kexec-tools-TAG := planetlab-4_1-rc2
49 ALL += kexec-tools
50 IN_BOOTCD += kexec-tools
51 endif
52
53 #
54 # madwifi
55 #
56 madwifi-MODULES := madwifi
57 madwifi-SPEC := madwifi.spec
58 madwifi-BUILD-FROM-SRPM := yes
59 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
60 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
61         kernel_release=$(kernel.rpm-release) \
62         kernel_arch=$(kernel.rpm-arch)
63 ALL += madwifi
64 IN_BOOTSTRAPFS += madwifi
65
66 #
67 # libnl
68 #
69 # [daniel]    wait for latest Fedora release 
70 # (03:29:46 PM) daniel_hozac: interfacing with the kernel directly when dealing with netlink was fugly, so... i had to find something nicer.
71 # (03:29:53 PM) daniel_hozac: the one in Fedora is lacking certain APIs i need.
72 #
73 libnl-MODULES := libnl
74 libnl-SPEC := libnl.spec
75 ALL += libnl
76
77 #
78 # util-vserver
79 #
80 util-vserver-MODULES := util-vserver
81 util-vserver-SPEC := util-vserver.spec
82 util-vserver-RPMFLAGS:= --without dietlibc
83 ALL += util-vserver
84 IN_BOOTSTRAPFS += util-vserver
85
86 #
87 # util-vserver-pl
88 #
89 util-vserver-pl-MODULES := util-vserver-pl
90 util-vserver-pl-SPEC := util-vserver-pl.spec
91 util-vserver-pl-DEPEND-DEVEL-RPMS := libnl libnl-devel util-vserver-lib util-vserver-devel util-vserver-core
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 pl_sshd-MODULES := pl_sshd
123 pl_sshd-SPEC := pl_sshd.spec
124 ALL += pl_sshd
125 IN_BOOTSTRAPFS += pl_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 pl_mom-MODULES := Mom
155 pl_mom-SPEC := pl_mom.spec
156 ALL += pl_mom
157 IN_BOOTSTRAPFS += pl_mom
158
159 #
160 # iptables
161 #
162 iptables-MODULES := iptables
163 iptables-SPEC := iptables.spec
164 iptables-DEPEND-DEVEL-RPMS := kernel-devel
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
177 #
178 # vsys
179 #
180 vsys_support=yes
181 ifeq "$(DISTRONAME)" "fc4"
182 vsys_support=
183 endif
184 ifeq "$(DISTRONAME)" "fc6"
185 vsys_support=
186 endif
187 # cannot find the required packages (see devel.pkgs) on centos5
188 ifeq "$(DISTRONAME)" "centos5"
189 vsys_support=
190 endif
191
192 ifeq "$(vsys_support)" "yes"
193 vsys-MODULES := vsys
194 vsys-SPEC := vsys.spec
195 IN_BOOTSTRAPFS += vsys
196 ALL += vsys
197 endif
198
199 #
200 # PLCAPI
201 #
202 PLCAPI-MODULES := PLCAPI
203 PLCAPI-SPEC := PLCAPI.spec
204 ALL += PLCAPI
205 IN_MYPLC += PLCAPI
206
207 #
208 # PLCWWW
209 #
210 PLCWWW-MODULES := PLCWWW
211 PLCWWW-SPEC := PLCWWW.spec
212 ALL += PLCWWW
213 IN_MYPLC += PLCWWW
214
215 #
216 # monitor
217 #
218 Monitor-MODULES := Monitor
219 Monitor-SPEC := Monitor.spec
220 ALL += Monitor
221 IN_BOOTSTRAPFS += Monitor
222
223 #
224 # nodeconfig
225 #
226 nodeconfig-MODULES := nodeconfig
227 nodeconfig-SPEC := nodeconfig.spec
228 ALL += nodeconfig
229 IN_MYPLC += nodeconfig
230
231 #
232 # bootmanager
233 #
234 bootmanager-MODULES := BootManager
235 bootmanager-SPEC := bootmanager.spec
236 ALL += bootmanager
237 IN_MYPLC += bootmanager
238
239 #
240 # pypcilib : used in bootcd
241
242 pypcilib-MODULES := pypcilib
243 pypcilib-SPEC := pypcilib.spec
244 ALL += pypcilib
245 IN_BOOTCD += pypcilib
246
247 #
248 # bootcd
249 #
250 bootcd-MODULES := BootCD build
251 bootcd-SPEC := bootcd.spec
252 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
253 # package has *some* dependencies, at least these ones
254 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
255 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
256 bootcd-RPMDATE := yes
257 ALL += bootcd
258 IN_MYPLC += bootcd
259
260 #
261 # vserver : reference image for slices
262 #
263 vserver-MODULES := VserverReference build
264 vserver-SPEC := vserver-reference.spec
265 # Package must be built as root
266 vserver-RPMBUILD := sudo bash ./rpmbuild.sh
267 # this list is useful for manual builds only, since nightly builds 
268 # always redo all sequentially - try to keep updated
269 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
270 vserver-DEPEND-FILES := RPMS/yumgroups.xml
271 vserver-RPMDATE := yes
272 ALL += vserver
273 IN_BOOTSTRAPFS += vserver
274
275 #
276 # bootstrapfs
277 #
278 bootstrapfs-MODULES := BootstrapFS build
279 bootstrapfs-SPEC := bootstrapfs.spec
280 bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
281 # package requires all regular packages
282 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
283 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
284 bootstrapfs-RPMDATE := yes
285 ALL += bootstrapfs
286 IN_MYPLC += bootstrapfs
287
288 #
289 # noderepo
290 #
291 # all rpms resulting from packages marked as being in bootstrapfs and vserver
292 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
293 # replace space with +++ (specvars cannot deal with spaces)
294 SPACE=$(subst x, ,x)
295 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
296
297 noderepo-MODULES := BootstrapFS 
298 noderepo-SPEC := noderepo.spec
299 noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
300 # package requires all regular packages
301 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
302 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
303 #export rpm list to the specfile
304 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
305 noderepo-RPMDATE := yes
306 ALL += noderepo
307 IN_MYPLC += noderepo
308
309 #
310 # MyPLC native : lightweight packaging, dependencies are yum-installed in a vserver
311 #
312 myplc-native-MODULES := MyPLC build 
313 myplc-native-SPEC := myplc-native.spec
314 # Package must be built as root
315 myplc-native-RPMBUILD := sudo bash ./rpmbuild.sh
316 # Thierry : don't depend on anything at build-time
317 #myplc-native-DEPEND-PACKAGES :=
318 # Thierry : dunno about this one, let's stay safe
319 myplc-native-DEPEND-FILES := myplc-release
320 ALL += myplc-native
321
322 ## #
323 ## # myplc : old-fashioned, chroot-based packaging
324 ## #
325 ## myplc-MODULES := MyPLC build
326 ## myplc-SPEC := myplc.spec
327 ## # Package must be built as root
328 ## myplc-RPMBUILD := sudo bash ./rpmbuild.sh
329 ## # myplc may require all packages
330 ## myplc-DEPEND-PACKAGES := $(IN_MYPLC)
331 ## myplc-DEPEND-FILES := RPMS/yumgroups.xml myplc-release
332 ## myplc-RPMDATE := yes
333 ## ALL += myplc
334
335 myplc-docs-MODULES := MyPLC PLCAPI NodeManager
336 myplc-docs-SPEC := myplc-docs.spec
337 ALL += myplc-docs