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