added perl-IO-Stty
[build.git] / Makefile
1 #
2 # PlanetLab RPM generation
3 #
4 # Copyright (c) 2003  The Trustees of Princeton University (Trustees).
5 # All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions are
9 # met: 
10
11 #     * Redistributions of source code must retain the above copyright
12 #       notice, this list of conditions and the following disclaimer.
13
14 #     * Redistributions in binary form must reproduce the above
15 #       copyright notice, this list of conditions and the following
16 #       disclaimer in the documentation and/or other materials provided
17 #       with the distribution.
18
19 #     * Neither the name of the copyright holder nor the names of its
20 #       contributors may be used to endorse or promote products derived
21 #       from this software without specific prior written permission.
22
23 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TRUSTEES OR
27 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 #
35 # $Id: Makefile,v 1.14 2004/04/12 14:52:05 alk-pl_rpm Exp $
36 #
37
38 # Default target
39 all:
40
41 #
42 # CVSROOT: CVSROOT to use
43 # INITIAL: CVS tag to use for Source0 tarball
44 # TAG: CVS tag to patch to
45 # MODULE: CVS module name to use
46 # SPEC: RPM spec file template
47 # RPMFLAGS: Miscellaneous RPM flags
48 # ALL: default targets
49 #
50 # If INITIAL is different than TAG, PatchSets will be generated
51 # automatically with cvsps(1) to bring Source0 up to TAG. If TAG is
52 # HEAD, a %{date} variable will be defined in the generated spec
53 # file. If a Patch: tag in the spec file matches a generated PatchSet
54 # number, the name of the patch will be as specified. Otherwise, the
55 # name of the patch will be the PatchSet number. %patch tags in the
56 # spec file are generated automatically.
57 #
58
59 #
60 # kernel-planetlab
61 #
62
63 kernel-planetlab-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
64 kernel-planetlab-INITIAL := linux-2_4_22
65 kernel-planetlab-TAG := HEAD
66 kernel-planetlab-MODULE := linux-2.4
67 kernel-planetlab-SPEC := linux-2.4/scripts/kernel-planetlab.spec
68 ALL += kernel-planetlab
69
70 #
71 # plkmod
72 #
73
74 plkmod-CVSROOT := pup-silk@cvs.planet-lab.org:/cvs
75 plkmod-INITIAL := HEAD
76 plkmod-TAG := HEAD
77 plkmod-MODULE := sys-v3
78 plkmod-SPEC := sys-v3/rpm/plkmod.spec
79 plkmod-RPMFLAGS = --define "kernelver $(shell rpmquery --queryformat '%{VERSION}-%{RELEASE}\n' --specfile SPECS/$(notdir $(kernel-planetlab-SPEC)) | head -1)"
80 ALL += plkmod
81
82 # Build kernel-planetlab first so we can bootstrap off of its build
83 plkmod: kernel-planetlab
84
85 #
86 # vdk
87 #
88
89 vdk-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
90 vdk-INITIAL := vdk_918
91 vdk-TAG := HEAD
92 vdk-MODULE := vdk
93 vdk-SPEC := vdk/vtune_driver.spec
94 vdk-RPMFLAGS = --define "kernelver $(shell rpmquery --queryformat '%{VERSION}-%{RELEASE}\n' --specfile SPECS/$(notdir $(kernel-planetlab-SPEC)) | head -1)"
95 ALL += vdk
96
97 # Build kernel-planetlab first so we can bootstrap off of its build
98 vdk: kernel-planetlab
99
100 #
101 # vserver
102 #
103
104 vserver-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
105 vserver-INITIAL := vserver-0_29
106 vserver-TAG := HEAD
107 vserver-MODULE := vserver
108 vserver-SPEC := vserver/vserver.spec
109 ALL += vserver
110
111 #
112 # vserver-init
113 #
114
115 vserver-init-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
116 vserver-init-INITIAL := HEAD
117 vserver-init-TAG := HEAD
118 vserver-init-MODULE := vserver-init
119 vserver-init-SPEC := vserver-init/vserver-init.spec
120 ALL += vserver-init
121
122 #
123 # vr-tools
124 #
125
126 vr-tools-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
127 vr-tools-INITIAL := HEAD
128 vr-tools-TAG := HEAD
129 vr-tools-MODULE := vr-tools
130 vr-tools-SPEC := vr-tools/vr-tools.spec
131 ALL += vr-tools
132
133 #
134 # vsh
135 #
136
137 vsh-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
138 vsh-INITIAL := bash-2_05
139 vsh-TAG := HEAD
140 vsh-MODULE := vsh
141 vsh-SPEC := vsh/vsh-planetlab.spec
142 ALL += vsh
143
144 # Build kernel-planetlab first so we can bootstrap off of its build
145 vsh: kernel-planetlab
146
147 #
148 # yum
149 #
150
151 yum-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
152 yum-INITIAL := YUM_2_0_3
153 yum-TAG := HEAD
154 yum-MODULE := yum
155 yum-SPEC := yum/yum.spec
156 ALL += yum
157
158 #
159 # ksymoops
160 #
161
162 ksymoops-CVSROOT := pup-pl_kernel@cvs.planet-lab.org:/cvs
163 ksymoops-INITIAL := ksymoops-2_4_9
164 ksymoops-TAG := HEAD
165 ksymoops-MODULE := ksymoops
166 ksymoops-SPEC := ksymoops/ksymoops.spec
167 ALL += ksymoops
168
169 #
170 # PlanetLabAccounts
171 #
172
173 PlanetLabAccounts-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
174 PlanetLabAccounts-INITIAL := HEAD
175 PlanetLabAccounts-TAG := HEAD
176 PlanetLabAccounts-MODULE := PlanetLabAccounts
177 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
178 ALL += PlanetLabAccounts
179
180 #
181 # MAKEDEV
182 #
183
184 MAKEDEV-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
185 MAKEDEV-INITIAL := MAKEDEV_3_2_2
186 MAKEDEV-TAG := HEAD
187 MAKEDEV-MODULE := MAKEDEV
188 MAKEDEV-SPEC := MAKEDEV/MAKEDEV.spec
189 ALL += MAKEDEV
190
191 #
192 # NodeUpdate
193 #
194
195 NodeUpdate-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
196 NodeUpdate-INITIAL := HEAD
197 NodeUpdate-TAG := HEAD
198 NodeUpdate-MODULE := NodeUpdate
199 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
200 ALL += NodeUpdate
201
202 #
203 # PlanetLabConf
204 #
205
206 PlanetLabConf-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
207 PlanetLabConf-INITIAL := HEAD
208 PlanetLabConf-TAG := HEAD
209 PlanetLabConf-MODULE := PlanetLabConf
210 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
211 ALL += PlanetLabConf
212
213 #
214 # PlanetLabKeys
215 #
216
217 PlanetLabKeys-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
218 PlanetLabKeys-INITIAL := HEAD
219 PlanetLabKeys-TAG := HEAD
220 PlanetLabKeys-MODULE := PlanetLabKeys
221 PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.spec
222 ALL += PlanetLabKeys
223
224 #
225 # BWLimit
226 #
227
228 BWLimit-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
229 BWLimit-INITIAL := HEAD
230 BWLimit-TAG := HEAD
231 BWLimit-MODULE := BWLimit
232 BWLimit-SPEC := BWLimit/BWLimit.spec
233 ALL += BWLimit
234
235 #
236 # perl-IO-Stty
237 #
238
239 perl-IO-Stty-CVSROOT := pup-node_pkgs@cvs.planet-lab.org:/cvs
240 perl-IO-Stty-INITIAL := PERL-IO-STTY_0_2
241 perl-IO-Stty-TAG := HEAD
242 perl-IO-Stty-MODULE := perl-IO-Stty
243 perl-IO-Stty-SPEC := perl-IO-Stty/perl-IO-Stty.spec
244 ALL += perl-IO-Stty
245
246 ifeq ($(findstring $(package),$(ALL)),)
247
248 # Build all packages
249 all: $(ALL)
250
251 # Recurse
252 $(ALL):
253         $(MAKE) package=$@
254
255 .PHONY: all $(ALL)
256
257 else
258
259 # Define variables for Makerules
260 CVSROOT := $($(package)-CVSROOT)
261 INITIAL := $($(package)-INITIAL)
262 TAG := $($(package)-TAG)
263 MODULE := $($(package)-MODULE)
264 SPEC := $($(package)-SPEC)
265 RPMFLAGS := $($(package)-RPMFLAGS)
266 CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)
267
268 include Makerules
269
270 endif
271
272 # Remove generated files
273 clean:
274         rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
275
276 .PHONY: clean