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