50ff0d3dd85129c9ec2098513e3b186490edca43
[build.git] / planetlab.mk
1 #
2 # PlanetLab standard components list
3 #
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2003-2006 The Trustees of Princeton University
6 #
7 # $Id$
8 #
9 # see doc in Makefile  
10 #
11 #
12 # kernel
13 #
14 # until we are able to build the new kernel layout:
15 # use the old exploded-tree, 2.6.20-based, version on fc4, 6 & 7
16 # and the new one on f8 - that requires the build-id patch
17
18
19 # use a package name with srpm in it:
20 # in this case the srpm is created by running make srpm in the codebase
21 #
22
23 srpm-kernel-$(HOSTARCH)-MODULES := linux-patches
24 srpm-kernel-$(HOSTARCH)-SPEC := kernel-2.6-planetlab.spec
25 ifeq ($(HOSTARCH),i386)
26 srpm-kernel-$(HOSTARCH)-RPMFLAGS:= --target i686
27 else
28 srpm-kernel-$(HOSTARCH)-RPMFLAGS:= --target $(HOSTARCH)
29 endif
30 KERNELS += srpm-kernel-$(HOSTARCH)
31
32 #else
33 #kernel-$(HOSTARCH)-MODULES := linux-tree
34 #kernel-$(HOSTARCH)-SPEC := scripts/kernel-2.6-planetlab.spec
35 #ifeq ($(HOSTARCH),i386)
36 #kernel-$(HOSTARCH)-RPMFLAGS:= --target i686
37 #else
38 #kernel-$(HOSTARCH)-RPMFLAGS:= --target $(HOSTARCH)
39 #endif
40 #KERNELS += kernel-$(HOSTARCH)
41 #endif
42
43 kernel: $(KERNELS)
44         sudo rpm -Uvh RPMS/i686/kernel-devel*.rpm
45
46 kernel-clean: $(foreach package,$(KERNELS),$(package)-clean)
47
48 kernel-devel: $(KERNELS)
49
50 ALL += $(KERNELS)
51
52 #
53 # libnl
54 #
55 # [daniel]    wait for latest Fedora release 
56 # (03:29:46 PM) daniel_hozac: interfacing with the kernel directly when dealing with netlink was fugly, so... i had to find something nicer.
57 # (03:29:53 PM) daniel_hozac: the one in Fedora is lacking certain APIs i need.
58 #
59 libnl-MODULES := libnl
60 libnl-SPEC := libnl.spec
61 ALL += libnl
62
63 #
64 # util-vserver
65 #
66 util-vserver-MODULES := util-vserver
67 util-vserver-SPEC := util-vserver.spec
68 util-vserver-RPMFLAGS:= --without dietlibc
69 util-vserver-DEPENDS := libnl
70 ALL += util-vserver
71
72 #
73 # NodeUpdate
74 #
75 NodeUpdate-MODULES := NodeUpdate
76 NodeUpdate-SPEC := NodeUpdate.spec
77 ALL += NodeUpdate
78
79 #
80 # ipod
81 #
82 PingOfDeath-MODULES := PingOfDeath
83 PingOfDeath-SPEC := ipod.spec
84 ALL += PingOfDeath
85
86 #
87 # NodeManager
88 #
89 NodeManager-MODULES := NodeManager
90 NodeManager-SPEC := NodeManager.spec
91 ALL += NodeManager
92
93 #
94 # pl_sshd
95 #
96 pl_sshd-MODULES := pl_sshd
97 pl_sshd-SPEC := pl_sshd.spec
98 ALL += pl_sshd
99
100 #
101 # libhttpd++: 
102 #
103 # Deprecate when vsys takes over [sapan].
104 # keep in build for proper.
105 #
106 libhttpd++-MODULES := libhttpd++
107 libhttpd++-SPEC := libhttpd++.spec
108 ALL += libhttpd++
109
110 #
111 # proper: Privileged Operations Service
112 #
113 proper-MODULES := proper
114 proper-SPEC := proper.spec
115 proper-RPMBUILD := sudo bash ./rpmbuild.sh
116 # proper uses scripts in util-python for building
117 proper-DEPENDS := libhttpd++ util-python
118 # disabled temporarily (or ?)
119 #ALL += proper
120
121 #
122 # codemux: Port 80 demux
123 #
124 codemux-MODULES := CoDemux
125 codemux-SPEC   := codemux.spec
126 codemux-RPMBUILD := sudo bash ./rpmbuild.sh
127 ALL += codemux
128
129 #
130 # ulogd
131 #
132 ulogd-MODULES := ulogd
133 ulogd-SPEC := ulogd.spec
134 ulogd-DEPENDS := kernel-devel proper
135 ALL += ulogd
136
137 #
138 # fprobe-ulog
139 #
140 fprobe-ulog-MODULES := fprobe-ulog
141 fprobe-ulog-SPEC := fprobe-ulog.spec
142 ALL += fprobe-ulog
143
144 #
145 # netflow
146 #
147 netflow-MODULES := PlanetFlow
148 netflow-SPEC := netflow.spec
149 ALL += netflow
150
151 #
152 # PlanetLab Mom: Cleans up your mess
153 #
154 pl_mom-MODULES := Mom
155 pl_mom-SPEC := pl_mom.spec
156 ALL += pl_mom
157
158 #
159 # iptables
160 #
161 iptables-MODULES := iptables
162 iptables-SPEC := iptables.spec
163 iptables-DEPENDS :=kernel-devel
164 ALL += iptables
165
166 #
167 # iproute
168 #
169 iproute-MODULES := iproute2
170 iproute-SPEC := iproute.spec
171 ALL += iproute
172
173 #
174 # util-python
175 #
176 # [marc]    deprecate with proper
177 #
178 util-python-MODULES := util-python
179 util-python-SPEC := util-python.spec
180 ALL += util-python
181
182 #
183 # vsys
184 #
185 vsys-MODULES := vsys
186 vsys-SPEC := vsys.spec
187 ifeq ($(DISTRO),"Fedora")
188 ifeq ($(RELEASE),7)
189 ALL += vsys
190 endif
191 endif
192
193 #
194 # PLCAPI
195 #
196 PLCAPI-MODULES := PLCAPI
197 PLCAPI-SPEC := PLCAPI.spec
198 ALL += PLCAPI
199
200 #
201 # PLCWWW
202 #
203 PLCWWW-MODULES := WWW
204 PLCWWW-SPEC := PLCWWW.spec
205 ALL += PLCWWW
206
207 #
208 # bootmanager
209 #
210 bootmanager-MODULES := BootManager build
211 bootmanager-SPEC := bootmanager.spec
212 # Package must be built as root
213 bootmanager-RPMBUILD := sudo bash ./rpmbuild.sh
214 ALL += bootmanager
215
216 #
217 # pypcilib : used in bootcd
218
219 pypcilib-MODULES := pypcilib
220 pypcilib-SPEC := pypcilib.spec
221 ALL += pypcilib
222
223 # copy the current list, so as to keep image-building rpms out
224 ALL-REGULARS := $(ALL)
225
226 #
227 # vserver : reference image for slices
228 #
229 vserver-MODULES := VserverReference build
230 vserver-SPEC := vserver-reference.spec
231 # Package must be built as root
232 vserver-RPMBUILD := sudo bash ./rpmbuild.sh
233 # package requires all regular packages
234 vserver-DEPENDS := $(ALL-REGULARS)
235 vserver-DEPENDFILES := RPMS/yumgroups.xml
236 ALL += vserver
237
238 #
239 # bootcd
240 #
241 bootcd-MODULES := BootCD BootManager build
242 bootcd-SPEC := bootcd.spec
243 bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
244 # package has *some* dependencies, at least these ones
245 bootcd-DEPENDS := $(ALL-REGULARS)
246 bootcd-DEPENDFILES := RPMS/yumgroups.xml
247 ALL += bootcd
248
249 #
250 # bootstrapfs
251 #
252 bootstrapfs-MODULES := BootstrapFS build
253 bootstrapfs-SPEC := bootstrapfs.spec
254 bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
255 # package requires all regular packages
256 bootstrapfs-DEPENDS := $(ALL-REGULARS)
257 bootstrapfs-DEPENDFILES := RPMS/yumgroups.xml
258 ALL += bootstrapfs
259
260 #
261 # myplc : initial, chroot-based packaging
262 #
263 myplc-MODULES := MyPLC build
264 myplc-SPEC := myplc.spec
265 # Package must be built as root
266 myplc-RPMBUILD := sudo bash ./rpmbuild.sh
267 # myplc may require all packages
268 myplc-DEPENDS := $(filter-out vserver,$(ALL))
269 myplc-DEPENDFILES := RPMS/yumgroups.xml
270 ALL += myplc
271
272 #
273 # MyPLC native : lightweight packaging, dependencies are yum-installed in a vserver
274 #
275 myplc-native-MODULES := MyPLC build 
276 myplc-native-SPEC := myplc-native.spec
277 # Package must be built as root
278 myplc-native-RPMBUILD := sudo bash ./rpmbuild.sh
279 # Thierry : don't depend on these at build-time
280 #myplc-native-DEPENDS := $(MyPLC-DEPENDS)
281 # Thierry : dunno about this one, let's stay safe
282 myplc-native-DEPENDFILES := $(MyPLC-DEPENDFILES)
283 #ALL += myplc-native
284
285 #
286 # MyPLC development environment : chroot-based 
287 #
288 myplc-devel-MODULES := MyPLC build 
289 myplc-devel-SPEC := myplc-devel.spec
290 myplc-devel-RPMBUILD := sudo bash ./rpmbuild.sh
291 #ALL += myplc-devel
292
293 #
294 # MyPLC native development environment
295 #
296 myplc-devel-native-MODULES := MyPLC
297 myplc-devel-native-SPEC := myplc-devel-native.spec
298 #ALL += myplc-devel-native