Merge branch 'master' of ssh://git.onelab.eu/git/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-unstable-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 # ipod
122 #
123 ipod-MODULES := PingOfDeath
124 ipod-SPEC := ipod.spec
125 ALL += ipod
126 IN_BOOTSTRAPFS += ipod
127
128 #
129 # NodeManager
130 #
131 nodemanager-MODULES := nodemanager
132 nodemanager-SPEC := NodeManager.spec
133 ALL += nodemanager
134 IN_BOOTSTRAPFS += nodemanager
135
136 #
137 # pl_sshd
138 #
139 sshd-MODULES := pl_sshd
140 sshd-SPEC := pl_sshd.spec
141 ALL += sshd
142 IN_BOOTSTRAPFS += sshd
143
144 #
145 # codemux: Port 80 demux
146 #
147 codemux-MODULES := codemux
148 codemux-SPEC   := codemux.spec
149 #ALL += codemux
150 #IN_BOOTSTRAPFS += codemux
151
152 #
153 # fprobe-ulog
154 #
155 fprobe-ulog-MODULES := fprobe-ulog
156 fprobe-ulog-SPEC := fprobe-ulog.spec
157 #ALL += fprobe-ulog
158 #IN_BOOTSTRAPFS += fprobe-ulog
159
160 #
161 # pf2slice
162 #
163 pf2slice-MODULES := pf2slice
164 pf2slice-SPEC := pf2slice.spec
165 #ALL += pf2slice
166
167 #
168 # PlanetLab Mom: Cleans up your mess
169 #
170 mom-MODULES := Mom
171 mom-SPEC := pl_mom.spec
172 #ALL += mom
173 #IN_BOOTSTRAPFS += mom
174
175 #
176 # iptables
177 #
178 iptables-MODULES := iptables
179 iptables-SPEC := iptables.spec
180 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
181 ALL += iptables
182 IN_BOOTSTRAPFS += iptables
183
184 #
185 # iproute
186 #
187 iproute-MODULES := iproute2
188 iproute-SPEC := iproute.spec
189 ALL += iproute
190 IN_BOOTSTRAPFS += iproute
191 IN_VSERVER += iproute
192 IN_BOOTCD += iproute
193
194 #
195 # inotify-tools - local import
196 # rebuild this on centos5 (not found) - see kexcludes in build.common
197 #
198 local_inotify_tools=false
199 ifeq "$(DISTRONAME)" "centos5"
200 local_inotify_tools=true
201 endif
202
203 ifeq "$(local_inotify_tools)" "true"
204 inotify-tools-MODULES := inotify-tools
205 inotify-tools-SPEC := inotify-tools.spec
206 inotify-tools-BUILD-FROM-SRPM := yes
207 IN_BOOTSTRAPFS += inotify-tools
208 ALL += inotify-tools
209 endif
210
211 #
212 # vsys
213 #
214 vsys-MODULES := vsys
215 vsys-SPEC := vsys.spec
216 ifeq "$(local_inotify_tools)" "true"
217 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
218 endif
219 IN_BOOTSTRAPFS += vsys
220 ALL += vsys
221
222 #
223 # vsys-scripts
224 #
225 vsys-scripts-MODULES := vsys-scripts
226 vsys-scripts-SPEC := vsys-scripts.spec
227 IN_BOOTSTRAPFS += vsys-scripts
228 ALL += vsys-scripts
229
230 #
231 # PLCAPI
232 #
233 PLCAPI-MODULES := plcapi
234 PLCAPI-SPEC := PLCAPI.spec
235 ALL += PLCAPI
236 IN_MYPLC += PLCAPI
237
238 #
239 # drupal
240
241 drupal-MODULES := drupal
242 drupal-SPEC := drupal.spec
243 drupal-BUILD-FROM-SRPM := yes
244 ALL += drupal
245 IN_MYPLC += drupal
246
247 #
248 # use the plewww module instead
249 #
250 plewww-MODULES := plewww
251 plewww-SPEC := plewww.spec
252 #ALL += plewww
253 #IN_MYPLC += plewww
254
255 #
256 # www-register-wizard
257 #
258 www-register-wizard-MODULES := www-register-wizard
259 www-register-wizard-SPEC := www-register-wizard.spec
260 ALL += www-register-wizard
261 IN_MYPLC += www-register-wizard
262
263 #
264 # pcucontrol
265 #
266 pcucontrol-MODULES := pcucontrol
267 pcucontrol-SPEC := pcucontrol.spec
268 ALL += pcucontrol
269
270 #
271 # monitor
272 #
273 monitor-MODULES := Monitor
274 monitor-SPEC := Monitor.spec
275 ALL += monitor
276 IN_BOOTSTRAPFS += monitor
277
278 #
279 # PLC RT
280 #
281 plcrt-MODULES := PLCRT
282 plcrt-SPEC := plcrt.spec
283 #ALL += plcrt
284
285 #
286 # zabbix
287 #
288 zabbix-MODULES := Monitor
289 zabbix-SPEC := zabbix.spec
290 zabbix-BUILD-FROM-SRPM := yes
291 #ALL += zabbix
292
293 #
294 # pyopenssl
295 #
296 pyopenssl-MODULES := pyopenssl
297 pyopenssl-SPEC := pyOpenSSL.spec
298 pyopenssl-BUILD-FROM-SRPM := yes
299 ALL += pyopenssl
300
301
302 #
303 # sfa - Slice Facility Architecture
304 #
305 # sfa-MODULES := sfa
306 # sfa-SPEC := sfa.spec
307 # ALL += sfa
308
309 #
310 # nodeconfig
311 #
312 nodeconfig-MODULES := nodeconfig build
313 nodeconfig-SPEC := nodeconfig.spec
314 ALL += nodeconfig
315 IN_MYPLC += nodeconfig
316
317 #
318 # bootmanager
319 #
320 bootmanager-MODULES := bootmanager
321 bootmanager-SPEC := bootmanager.spec
322 ALL += bootmanager
323 IN_MYPLC += bootmanager
324
325 #
326 # pypcilib : used in bootcd
327
328 pypcilib-MODULES := pypcilib
329 pypcilib-SPEC := pypcilib.spec
330 ALL += pypcilib
331 IN_BOOTCD += pypcilib
332
333 #
334 # pyplnet
335 #
336 pyplnet-MODULES := pyplnet
337 pyplnet-SPEC := pyplnet.spec
338 ALL += pyplnet
339 IN_BOOTSTRAPFS += pyplnet
340 IN_MYPLC += pyplnet
341 IN_BOOTCD += pyplnet
342
343 #
344 # bootcd
345 #
346 bootcd-MODULES := bootcd build
347 bootcd-SPEC := bootcd.spec
348 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
349 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
350 bootcd-RPMDATE := yes
351 ALL += bootcd
352 IN_MYPLC += bootcd
353
354 #
355 # vserver : reference image for slices
356 #
357 vserver-MODULES := vserver-reference build
358 vserver-SPEC := vserver-reference.spec
359 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
360 vserver-DEPEND-FILES := RPMS/yumgroups.xml
361 vserver-RPMDATE := yes
362 ALL += vserver
363 IN_BOOTSTRAPFS += vserver
364
365 #
366 # bootstrapfs
367 #
368 bootstrapfs-MODULES := bootstrapfs build
369 bootstrapfs-SPEC := bootstrapfs.spec
370 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
371 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
372 bootstrapfs-RPMDATE := yes
373 ALL += bootstrapfs
374 IN_MYPLC += bootstrapfs
375
376 #
377 # noderepo
378 #
379 # all rpms resulting from packages marked as being in bootstrapfs and vserver
380 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
381 # replace space with +++ (specvars cannot deal with spaces)
382 SPACE=$(subst x, ,x)
383 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
384
385 noderepo-MODULES := bootstrapfs 
386 noderepo-SPEC := noderepo.spec
387 # package requires all regular packages
388 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
389 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
390 #export rpm list to the specfile
391 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
392 noderepo-RPMDATE := yes
393 ALL += noderepo
394 IN_MYPLC += noderepo
395
396 #
397 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
398 #
399 myplc-MODULES := myplc build 
400 myplc-SPEC := myplc.spec
401 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
402 ALL += myplc
403
404 # myplc-docs only contains docs for PLCAPI and NMAPI, but
405 # we still need to pull MyPLC, as it is where the specfile lies, 
406 # together with the utility script docbook2drupal.sh
407 myplc-docs-MODULES := myplc plcapi nodemanager Monitor
408 myplc-docs-SPEC := myplc-docs.spec
409 ALL += myplc-docs
410
411 # using some other name than myplc-release, as this is a make target already
412 release-MODULES := myplc
413 release-SPEC := myplc-release.spec
414 release-RPMDATE := yes
415 ALL += release