obsoletes useles -RPMBUILD
[build.git] / trellis.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 # 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 # madwifi
43 #
44 madwifi-MODULES := madwifi
45 madwifi-SPEC := madwifi.spec
46 madwifi-BUILD-FROM-SRPM := yes
47 madwifi-DEPEND-DEVEL-RPMS := kernel-devel
48 madwifi-SPECVARS = kernel_version=$(kernel.rpm-version) \
49         kernel_release=$(kernel.rpm-release) \
50         kernel_arch=$(kernel.rpm-arch)
51 ALL += madwifi
52 IN_BOOTSTRAPFS += madwifi
53
54 #
55 # util-vserver
56 #
57 util-vserver-MODULES := util-vserver
58 util-vserver-SPEC := util-vserver.spec
59 #util-vserver-RPMFLAGS:= --without dietlibc
60 ALL += util-vserver
61 IN_BOOTSTRAPFS += util-vserver
62
63 #
64 # libnl - local import
65 # we need either 1.1 or at least 1.0.pre6
66 # rebuild this on centos5 - see kexcludes in build.common
67 #
68 local_libnl=false
69 ifeq "$(DISTRONAME)" "centos5"
70 local_libnl=true
71 endif
72
73 ifeq "$(local_libnl)" "true"
74 libnl-MODULES := libnl
75 libnl-SPEC := libnl.spec
76 libnl-BUILD-FROM-SRPM := yes
77 # this sounds like the thing to do, but in fact linux/if_vlan.h comes with kernel-headers
78 libnl-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
79 ALL += libnl
80 IN_BOOTSTRAPFS += libnl
81 endif
82
83 #
84 # util-vserver-pl
85 #
86 util-vserver-pl-MODULES := util-vserver-pl
87 util-vserver-pl-SPEC := util-vserver-pl.spec
88 util-vserver-pl-DEPEND-DEVEL-RPMS := util-vserver-lib util-vserver-devel util-vserver-core 
89 ifeq "$(local_libnl)" "true"
90 util-vserver-pl-DEPEND-DEVEL-RPMS += libnl libnl-devel
91 endif
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 sshd-MODULES := pl_sshd
123 sshd-SPEC := pl_sshd.spec
124 ALL += sshd
125 IN_BOOTSTRAPFS += sshd
126
127 #
128 # codemux: Port 80 demux
129 #
130 codemux-MODULES := CoDemux
131 codemux-SPEC   := codemux.spec
132 ALL += codemux
133 IN_BOOTSTRAPFS += codemux
134
135 #
136 # fprobe-ulog
137 #
138 fprobe-ulog-MODULES := fprobe-ulog
139 fprobe-ulog-SPEC := fprobe-ulog.spec
140 ALL += fprobe-ulog
141 IN_BOOTSTRAPFS += fprobe-ulog
142
143 #
144 # pf2slice
145 #
146 pf2slice-MODULES := pf2slice
147 pf2slice-SPEC := pf2slice.spec
148 ALL += pf2slice
149
150 #
151 # PlanetLab Mom: Cleans up your mess
152 #
153 mom-MODULES := Mom
154 mom-SPEC := pl_mom.spec
155 ALL += mom
156 IN_BOOTSTRAPFS += mom
157
158 #
159 # iptables
160 #
161 iptables-MODULES := iptables
162 iptables-SPEC := iptables.spec
163 iptables-DEPEND-DEVEL-RPMS := kernel-devel kernel-headers
164 ALL += iptables
165 IN_BOOTSTRAPFS += iptables
166
167 #
168 # iproute
169 #
170 iproute-MODULES := iproute2
171 iproute-SPEC := iproute.spec
172 ALL += iproute
173 IN_BOOTSTRAPFS += iproute
174 IN_VSERVER += iproute
175 IN_BOOTCD += iproute
176
177 #
178 # inotify-tools - local import
179 # rebuild this on centos5 (not found) - see kexcludes in build.common
180 #
181 local_inotify_tools=false
182 ifeq "$(DISTRONAME)" "centos5"
183 local_inotify_tools=true
184 endif
185
186 ifeq "$(local_inotify_tools)" "true"
187 inotify-tools-MODULES := inotify-tools
188 inotify-tools-SPEC := inotify-tools.spec
189 inotify-tools-BUILD-FROM-SRPM := yes
190 IN_BOOTSTRAPFS += inotify-tools
191 ALL += inotify-tools
192 endif
193
194 #
195 # vsys
196 #
197 vsys-MODULES := vsys
198 vsys-SPEC := vsys.spec
199 ifeq "$(local_inotify_tools)" "true"
200 vsys-DEPEND-DEVEL-RPMS := inotify-tools inotify-tools-devel
201 endif
202 IN_BOOTSTRAPFS += vsys
203 ALL += vsys
204
205 #
206 # vsys-scripts
207 #
208 vsys-scripts-MODULES := vsys-scripts
209 vsys-scripts-SPEC := vsys-scripts.spec
210 IN_BOOTSTRAPFS += vsys-scripts
211 ALL += vsys-scripts
212
213 #
214 # PLCAPI
215 #
216 PLCAPI-MODULES := PLCAPI
217 PLCAPI-SPEC := PLCAPI.spec
218 ALL += PLCAPI
219 IN_MYPLC += PLCAPI
220
221 #
222 # drupal
223
224 drupal-MODULES := drupal
225 drupal-SPEC := drupal.spec
226 drupal-BUILD-FROM-SRPM := yes
227 ALL += drupal
228 IN_MYPLC += drupal
229
230 #
231 # use the plewww module instead
232 #
233 plewww-MODULES := PLEWWW
234 plewww-SPEC := plewww.spec
235 ALL += plewww
236 IN_MYPLC += plewww
237
238 #
239 # www-register-wizard
240 #
241 www-register-wizard-MODULES := www-register-wizard
242 www-register-wizard-SPEC := www-register-wizard.spec
243 ALL += www-register-wizard
244 IN_MYPLC += www-register-wizard
245
246 #
247 # pcucontrol
248 #
249 pcucontrol-MODULES := pcucontrol
250 pcucontrol-SPEC := pcucontrol.spec
251 ALL += pcucontrol
252
253 #
254 # monitor
255 #
256 monitor-MODULES := Monitor
257 monitor-SPEC := Monitor.spec
258 ALL += monitor
259 IN_BOOTSTRAPFS += monitor
260
261 #
262 # PLC RT
263 #
264 plcrt-MODULES := PLCRT
265 plcrt-SPEC := plcrt.spec
266 ALL += plcrt
267
268 #
269 # zabbix
270 #
271 zabbix-MODULES := Monitor
272 zabbix-SPEC := zabbix.spec
273 zabbix-BUILD-FROM-SRPM := yes
274 ALL += zabbix
275
276 #
277 # pyopenssl
278 #
279 pyopenssl-MODULES := pyopenssl
280 pyopenssl-SPEC := pyOpenSSL.spec
281 pyopenssl-BUILD-FROM-SRPM := yes
282 ALL += pyopenssl
283
284
285 #
286 # sfa - Slice Facility Architecture
287 #
288 sfa-MODULES := sfa
289 sfa-SPEC := sfa.spec
290 ALL += sfa
291
292 #
293 # nodeconfig
294 #
295 nodeconfig-MODULES := nodeconfig build
296 nodeconfig-SPEC := nodeconfig.spec
297 ALL += nodeconfig
298 IN_MYPLC += nodeconfig
299
300 #
301 # bootmanager
302 #
303 bootmanager-MODULES := BootManager
304 bootmanager-SPEC := bootmanager.spec
305 ALL += bootmanager
306 IN_MYPLC += bootmanager
307
308 #
309 # pypcilib : used in bootcd
310
311 pypcilib-MODULES := pypcilib
312 pypcilib-SPEC := pypcilib.spec
313 ALL += pypcilib
314 IN_BOOTCD += pypcilib
315
316 #
317 # pyplnet
318 #
319 pyplnet-MODULES := pyplnet
320 pyplnet-SPEC := pyplnet.spec
321 ALL += pyplnet
322 IN_BOOTSTRAPFS += pyplnet
323 IN_MYPLC += pyplnet
324 IN_BOOTCD += pyplnet
325
326 #
327 # bootcd
328 #
329 bootcd-MODULES := BootCD build
330 bootcd-SPEC := bootcd.spec
331 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
332 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
333 bootcd-RPMDATE := yes
334 ALL += bootcd
335 IN_MYPLC += bootcd
336
337 #
338 # vserver : reference image for slices
339 #
340 vserver-MODULES := VserverReference build
341 vserver-SPEC := vserver-reference.spec
342 vserver-DEPEND-PACKAGES := $(IN_VSERVER)
343 vserver-DEPEND-FILES := RPMS/yumgroups.xml
344 vserver-RPMDATE := yes
345 ALL += vserver
346 IN_BOOTSTRAPFS += vserver
347
348 #
349 # bootstrapfs
350 #
351 bootstrapfs-MODULES := BootstrapFS build
352 bootstrapfs-SPEC := bootstrapfs.spec
353 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
354 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
355 bootstrapfs-RPMDATE := yes
356 ALL += bootstrapfs
357 IN_MYPLC += bootstrapfs
358
359 #
360 # noderepo
361 #
362 # all rpms resulting from packages marked as being in bootstrapfs and vserver
363 NODEREPO_RPMS = $(foreach package,$(IN_BOOTSTRAPFS) $(IN_VSERVER),$($(package).rpms))
364 # replace space with +++ (specvars cannot deal with spaces)
365 SPACE=$(subst x, ,x)
366 NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
367
368 noderepo-MODULES := BootstrapFS 
369 noderepo-SPEC := noderepo.spec
370 # package requires all regular packages
371 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
372 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
373 #export rpm list to the specfile
374 noderepo-SPECVARS = node_rpms_plus=$(NODEREPO_RPMS_3PLUS)
375 noderepo-RPMDATE := yes
376 ALL += noderepo
377 IN_MYPLC += noderepo
378
379 #
380 # MyPLC : lightweight packaging, dependencies are yum-installed in a vserver
381 #
382 myplc-MODULES := MyPLC build 
383 myplc-SPEC := myplc.spec
384 myplc-DEPEND-FILES := myplc-release RPMS/yumgroups.xml
385 ALL += myplc
386
387 # myplc-docs only contains docs for PLCAPI and NMAPI, but
388 # we still need to pull MyPLC, as it is where the specfile lies, 
389 # together with the utility script docbook2drupal.sh
390 myplc-docs-MODULES := MyPLC PLCAPI NodeManager Monitor
391 myplc-docs-SPEC := myplc-docs.spec
392 ALL += myplc-docs
393
394 # using some other name than myplc-release, as this is a make target already
395 release-MODULES := MyPLC
396 release-SPEC := myplc-release.spec
397 release-RPMDATE := yes
398 ALL += release
399