fix for vsys build
[build.git] / coblitz.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 # $Id$
11 #
12 # see doc in Makefile  
13 #
14
15 # mkinitrd
16 #
17 ifeq "$(PLDISTROTAGS)" "coblitz-latest-tags.mk"
18 ifeq "$(DISTRONAME)" "centos5"
19 mkinitrd-MODULES := mkinitrd
20 mkinitrd-SPEC := mkinitrd.spec
21 mkinitrd-BUILD-FROM-SRPM := yes
22 ALL += mkinitrd
23 IN_BOOTCD += mkinitrd
24 IN_VSERVER += mkinitrd
25 IN_BOOTSTRAPFS += mkinitrd
26 IN_MYPLC += mkinitrd
27 endif
28 endif
29
30 #
31 # kernel
32 #
33 # use a package name with srpm in it:
34 # so the source rpm is created by running make srpm in the codebase
35 #
36
37 kernel-MODULES := linux-2.6
38 kernel-SPEC := kernel-2.6.spec
39 kernel-BUILD-FROM-SRPM := yes
40 ifeq "$(HOSTARCH)" "i386"
41 kernel-RPMFLAGS:= --target i686
42 else
43 kernel-RPMFLAGS:= --target $(HOSTARCH)
44 endif
45 KERNELS += kernel
46
47 kernels: $(KERNELS)
48 kernels-clean: $(foreach package,$(KERNELS),$(package)-clean)
49
50 ALL += $(KERNELS)
51 # this is to mark on which image a given rpm is supposed to go
52 IN_BOOTCD += $(KERNELS)
53 IN_VSERVER += $(KERNELS)
54 IN_BOOTSTRAPFS += $(KERNELS)
55 # turns out myplc installs kernel-vserver
56 IN_MYPLC += $(KERNELS)
57
58 #
59 # madwifi
60 #
61 madwifi-MODULES := madwifi
62 madwifi-SPEC := madwifi.spec
63 madwifi-BUILD-FROM-SRPM := yes
64 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
65 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
66         kernel_release=$(kernel.rpm-release) \
67         kernel_arch=$(kernel.rpm-arch)
68 #ALL += madwifi
69 #IN_BOOTSTRAPFS += madwifi
70
71 #
72 # util-vserver
73 #
74 util-vserver-MODULES := util-vserver
75 util-vserver-SPEC := util-vserver.spec
76 util-vserver-RPMFLAGS:= --without dietlibc
77 ALL += util-vserver
78 IN_BOOTSTRAPFS += util-vserver
79
80 #
81 # libnl - local import
82 # we need either 1.1 or at least 1.0.pre6
83 # rebuild this on centos5 - see kexcludes in build.common
84 #
85 local_libnl=false
86 ifeq "$(DISTRONAME)" "centos5"
87 local_libnl=true
88 endif
89
90 ifeq "$(local_libnl)" "true"
91 libnl-MODULES := libnl
92 libnl-SPEC := libnl.spec
93 libnl-BUILD-FROM-SRPM := yes
94 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
95 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
96 ALL += libnl
97 IN_BOOTSTRAPFS += libnl
98 endif
99
100 #
101 # util-vserver-pl
102 #
103 util-vserver-pl-MODULES := util-vserver-pl
104 util-vserver-pl-SPEC := util-vserver-pl.spec
105 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core 
106 ifeq "$(local_libnl)" "true"
107 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
108 endif
109 ALL += util-vserver-pl
110 IN_BOOTSTRAPFS += util-vserver-pl
111
112 #
113 # NodeUpdate
114 #
115 nodeupdate-MODULES := nodeupdate
116 nodeupdate-SPEC := NodeUpdate.spec
117 ALL += nodeupdate
118 IN_BOOTSTRAPFS += nodeupdate
119
120 #
121 # NodeManager
122 #
123 nodemanager-MODULES := nodemanager
124 nodemanager-SPEC := NodeManager.spec
125 ALL += nodemanager
126 IN_BOOTSTRAPFS += nodemanager
127
128 #
129 # codemux: Port 80 demux
130 #
131 codemux-MODULES := codemux
132 codemux-SPEC   := codemux.spec
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 "$(DISTRONAME)" "sl6"
188 local_inotify_tools=true
189 endif
190
191 ifeq "$(local_inotify_tools)" "true"
192 inotify-tools-MODULES := inotify-tools
193 inotify-tools-SPEC := inotify-tools.spec
194 inotify-tools-BUILD-FROM-SRPM := yes
195 IN_BOOTSTRAPFS += inotify-tools
196 ALL += inotify-tools
197 endif
198
199 #
200 # vsys
201 #
202 vsys-MODULES := vsys
203 vsys-SPEC := vsys.spec
204 # ocaml-docs is not needed anymore but keep it on a tmp basis as some tags may still have it
205 vsys-DEVEL-RPMS += ocaml-ocamldoc ocaml-docs
206 ifeq "$(local_inotify_tools)" "true"
207 vsys-DEPEND-DEVEL-RPMS += inotify-tools inotify-tools-devel
208 endif
209 IN_BOOTSTRAPFS += vsys
210 ALL += vsys
211
212 #
213 # vsys-scripts
214 #
215 vsys-scripts-MODULES := vsys-scripts
216 vsys-scripts-SPEC := vsys-scripts.spec
217 IN_BOOTSTRAPFS += vsys-scripts
218 ALL += vsys-scripts
219
220 #
221 # PLCAPI
222 #
223 PLCAPI-MODULES := plcapi
224 PLCAPI-SPEC := PLCAPI.spec
225 ALL += PLCAPI
226 IN_MYPLC += PLCAPI
227
228 #
229 # drupal
230
231 drupal-MODULES := drupal
232 drupal-SPEC := drupal.spec
233 drupal-BUILD-FROM-SRPM := yes
234 ALL += drupal
235 IN_MYPLC += drupal
236
237 #
238 # use the plewww module instead
239 #
240 plewww-MODULES := plewww
241 plewww-SPEC := plewww.spec
242 #ALL += plewww
243 #IN_MYPLC += plewww
244
245 #
246 # pcucontrol
247 #
248 pcucontrol-MODULES := pcucontrol
249 pcucontrol-SPEC := pcucontrol.spec
250 ALL += pcucontrol
251
252 #
253 # pyopenssl
254 #
255 pyopenssl-MODULES := pyopenssl
256 pyopenssl-SPEC := pyOpenSSL.spec
257 pyopenssl-BUILD-FROM-SRPM := yes
258 ALL += pyopenssl
259
260
261 #
262 # nodeconfig
263 #
264 nodeconfig-MODULES := nodeconfig build
265 nodeconfig-SPEC := nodeconfig.spec
266 ALL += nodeconfig
267 IN_MYPLC += nodeconfig
268
269 #
270 # bootmanager
271 #
272 bootmanager-MODULES := bootmanager
273 bootmanager-SPEC := bootmanager.spec
274 ALL += bootmanager
275 IN_MYPLC += bootmanager
276
277 #
278 # pypcilib : used in bootcd
279
280 pypcilib-MODULES := pypcilib
281 pypcilib-SPEC := pypcilib.spec
282 ALL += pypcilib
283 IN_BOOTCD += pypcilib
284
285 #
286 # pyplnet
287 #
288 pyplnet-MODULES := pyplnet
289 pyplnet-SPEC := pyplnet.spec
290 ALL += pyplnet
291 IN_BOOTSTRAPFS += pyplnet
292 IN_MYPLC += pyplnet
293 IN_BOOTCD += pyplnet
294
295 #
296 # bootcd
297 #
298 bootcd-MODULES := bootcd build
299 bootcd-SPEC := bootcd.spec
300 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
301 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
302 bootcd-RPMDATE := yes
303 ALL += bootcd
304 IN_MYPLC += bootcd
305
306 #
307 # vserver : reference image for slices
308 #
309 vserver-MODULES := vserver-reference build
310 vserver-SPEC := vserver-reference.spec
311 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
312 vserver-DEPEND-FILES := RPMS/yumgroups.xml
313 vserver-RPMDATE := yes
314 ALL += vserver
315 IN_BOOTSTRAPFS += vserver
316
317 #
318 # bootstrapfs
319 #
320 bootstrapfs-MODULES := bootstrapfs build
321 bootstrapfs-SPEC := bootstrapfs.spec
322 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
323 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
324 bootstrapfs-RPMDATE := yes
325 ALL += bootstrapfs
326 IN_MYPLC += bootstrapfs
327
328 #
329 # noderepo
330 #
331 # all rpms resulting from packages marked as being in bootstrapfs and vserver
332 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
333 # replace space with +++ (specvars cannot deal with spaces)
334 SPACE=$(subst x, ,x)
335 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
336
337 noderepo-MODULES := bootstrapfs 
338 noderepo-SPEC := noderepo.spec
339 # package requires all regular packages
340 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
341 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
342 #export rpm list to the specfile
343 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
344 noderepo-RPMDATE := yes
345 ALL += noderepo
346 IN_MYPLC += noderepo
347
348 #
349 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
350 #
351 myplc-MODULES := myplc build 
352 myplc-SPEC := myplc.spec
353 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
354 ALL += myplc
355
356 # myplc-docs only contains docs for PLCAPI and NMAPI, but
357 # we still need to pull MyPLC, as it is where the specfile lies, 
358 # together with the utility script docbook2drupal.sh
359 myplc-docs-MODULES := myplc plcapi nodemanager
360 myplc-docs-SPEC := myplc-docs.spec
361 ALL += myplc-docs
362
363 # using some other name than myplc-release, as this is a make target already
364 release-MODULES := myplc
365 release-SPEC := myplc-release.spec
366 release-RPMDATE := yes
367 ALL += release