still trying...
[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 # 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 "$(DISTRONAME)" "sl6"
204 local_inotify_tools=true
205 endif
206
207 ifeq "$(local_inotify_tools)" "true"
208 inotify-tools-MODULES := inotify-tools
209 inotify-tools-SPEC := inotify-tools.spec
210 inotify-tools-BUILD-FROM-SRPM := yes
211 IN_BOOTSTRAPFS += inotify-tools
212 ALL += inotify-tools
213 endif
214
215 #
216 # vsys
217 #
218 vsys-MODULES := vsys
219 vsys-SPEC := vsys.spec
220 ifeq "$(local_inotify_tools)" "true"
221 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
222 endif
223 IN_BOOTSTRAPFS += vsys
224 ALL += vsys
225
226 #
227 # vsys-scripts
228 #
229 vsys-scripts-MODULES := vsys-scripts
230 vsys-scripts-SPEC := vsys-scripts.spec
231 IN_BOOTSTRAPFS += vsys-scripts
232 ALL += vsys-scripts
233
234 #
235 # PLCAPI
236 #
237 PLCAPI-MODULES := plcapi
238 PLCAPI-SPEC := PLCAPI.spec
239 ALL += PLCAPI
240 IN_MYPLC += PLCAPI
241
242 #
243 # drupal
244
245 drupal-MODULES := drupal
246 drupal-SPEC := drupal.spec
247 drupal-BUILD-FROM-SRPM := yes
248 ALL += drupal
249 IN_MYPLC += drupal
250
251 #
252 # use the plewww module instead
253 #
254 plewww-MODULES := plewww
255 plewww-SPEC := plewww.spec
256 #ALL += plewww
257 #IN_MYPLC += plewww
258
259 #
260 # www-register-wizard
261 #
262 www-register-wizard-MODULES := www-register-wizard
263 www-register-wizard-SPEC := www-register-wizard.spec
264 ALL += www-register-wizard
265 IN_MYPLC += www-register-wizard
266
267 #
268 # pcucontrol
269 #
270 pcucontrol-MODULES := pcucontrol
271 pcucontrol-SPEC := pcucontrol.spec
272 ALL += pcucontrol
273
274 #
275 # monitor
276 #
277 monitor-MODULES := Monitor
278 monitor-SPEC := Monitor.spec
279 ALL += monitor
280 IN_BOOTSTRAPFS += monitor
281
282 #
283 # PLC RT
284 #
285 plcrt-MODULES := PLCRT
286 plcrt-SPEC := plcrt.spec
287 #ALL += plcrt
288
289 #
290 # zabbix
291 #
292 zabbix-MODULES := Monitor
293 zabbix-SPEC := zabbix.spec
294 zabbix-BUILD-FROM-SRPM := yes
295 #ALL += zabbix
296
297 #
298 # pyopenssl
299 #
300 pyopenssl-MODULES := pyopenssl
301 pyopenssl-SPEC := pyOpenSSL.spec
302 pyopenssl-BUILD-FROM-SRPM := yes
303 ALL += pyopenssl
304
305
306 #
307 # sfa - Slice Facility Architecture
308 #
309 # sfa-MODULES := sfa
310 # sfa-SPEC := sfa.spec
311 # ALL += sfa
312
313 #
314 # nodeconfig
315 #
316 nodeconfig-MODULES := nodeconfig build
317 nodeconfig-SPEC := nodeconfig.spec
318 ALL += nodeconfig
319 IN_MYPLC += nodeconfig
320
321 #
322 # bootmanager
323 #
324 bootmanager-MODULES := bootmanager
325 bootmanager-SPEC := bootmanager.spec
326 ALL += bootmanager
327 IN_MYPLC += bootmanager
328
329 #
330 # pypcilib : used in bootcd
331
332 pypcilib-MODULES := pypcilib
333 pypcilib-SPEC := pypcilib.spec
334 ALL += pypcilib
335 IN_BOOTCD += pypcilib
336
337 #
338 # pyplnet
339 #
340 pyplnet-MODULES := pyplnet
341 pyplnet-SPEC := pyplnet.spec
342 ALL += pyplnet
343 IN_BOOTSTRAPFS += pyplnet
344 IN_MYPLC += pyplnet
345 IN_BOOTCD += pyplnet
346
347 #
348 # bootcd
349 #
350 bootcd-MODULES := bootcd build
351 bootcd-SPEC := bootcd.spec
352 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
353 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
354 bootcd-RPMDATE := yes
355 ALL += bootcd
356 IN_MYPLC += bootcd
357
358 #
359 # vserver : reference image for slices
360 #
361 vserver-MODULES := vserver-reference build
362 vserver-SPEC := vserver-reference.spec
363 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
364 vserver-DEPEND-FILES := RPMS/yumgroups.xml
365 vserver-RPMDATE := yes
366 ALL += vserver
367 IN_BOOTSTRAPFS += vserver
368
369 #
370 # bootstrapfs
371 #
372 bootstrapfs-MODULES := bootstrapfs build
373 bootstrapfs-SPEC := bootstrapfs.spec
374 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
375 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
376 bootstrapfs-RPMDATE := yes
377 ALL += bootstrapfs
378 IN_MYPLC += bootstrapfs
379
380 #
381 # noderepo
382 #
383 # all rpms resulting from packages marked as being in bootstrapfs and vserver
384 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
385 # replace space with +++ (specvars cannot deal with spaces)
386 SPACE=$(subst x, ,x)
387 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
388
389 noderepo-MODULES := bootstrapfs 
390 noderepo-SPEC := noderepo.spec
391 # package requires all regular packages
392 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
393 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
394 #export rpm list to the specfile
395 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
396 noderepo-RPMDATE := yes
397 ALL += noderepo
398 IN_MYPLC += noderepo
399
400 #
401 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
402 #
403 myplc-MODULES := myplc build 
404 myplc-SPEC := myplc.spec
405 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
406 ALL += myplc
407
408 # myplc-docs only contains docs for PLCAPI and NMAPI, but
409 # we still need to pull MyPLC, as it is where the specfile lies, 
410 # together with the utility script docbook2drupal.sh
411 myplc-docs-MODULES := myplc plcapi nodemanager Monitor
412 myplc-docs-SPEC := myplc-docs.spec
413 ALL += myplc-docs
414
415 # using some other name than myplc-release, as this is a make target already
416 release-MODULES := myplc
417 release-SPEC := myplc-release.spec
418 release-RPMDATE := yes
419 ALL += release