]>
Commit | Line | Data |
---|---|---|
db0834fa JS |
1 | #!/bin/sh |
2 | # Makes the wxWindows RPMs | |
3 | ||
4 | doupdatecvs() | |
5 | { | |
6 | cd $WXSRC | |
7 | echo Updating from CVS... | |
8 | cvswx update -d -P | |
9 | } | |
10 | ||
11 | dospinwxgtk() | |
12 | { | |
13 | echo Making wxGTK RPMs... | |
14 | RPM_ROOT=$WXDEST/wxgtk/rpm-root | |
15 | ||
16 | if [ ! -d $WXDEST ]; then | |
17 | mkdir $WXDEST | |
18 | fi | |
19 | ||
20 | rm -f -r $WXDEST/wxgtk | |
21 | mkdir $WXDEST/wxgtk | |
22 | mkdir $WXDEST/wxgtk/release | |
23 | mkdir $RPM_ROOT | |
24 | ||
25 | cd $WXSRC | |
26 | cd locale | |
27 | make allmo | |
28 | cd $WXDEST/wxgtk/release | |
29 | echo Configuring... | |
789f8e6a | 30 | $WXSRC/configure --with-gtk --no-recursion |
db0834fa JS |
31 | echo Making... |
32 | make -j1 dist bzip-dist-only | |
33 | ||
34 | echo Setting up RPM build dir $RPM_ROOT... | |
35 | rm -f -r $RPM_ROOT | |
36 | mkdir $RPM_ROOT | |
37 | mkdir $RPM_ROOT/BUILD | |
38 | mkdir $RPM_ROOT/RPMS | |
39 | mkdir $RPM_ROOT/RPMS/i386 | |
40 | mkdir $RPM_ROOT/RPMS/i686 | |
41 | mkdir $RPM_ROOT/RPMS/noarch | |
42 | mkdir $RPM_ROOT/SOURCES | |
43 | mkdir $RPM_ROOT/SPECS | |
44 | mkdir $RPM_ROOT/SRPMS | |
45 | ||
46 | echo %_topdir $RPM_ROOT > ~/.rpmmacros | |
47 | ||
48 | echo Copying wxGTK-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES... | |
49 | cp wxGTK-$WXVER.tar.bz2 $RPM_ROOT/SOURCES | |
50 | echo Copying wxGTK.spec to $RPM_ROOT/SPECS... | |
51 | cp $WXSRC/wxGTK.spec $RPM_ROOT/SPECS | |
52 | ||
53 | echo Starting wxGTK RPM build... | |
54 | cd $RPM_ROOT | |
55 | rpmbuild -ba SPECS/wxGTK.spec 2>&1 | tee wxGTK.out | |
56 | ||
789f8e6a | 57 | echo Finished wxGTK RPM build, in $RPM_ROOT. |
db0834fa JS |
58 | echo "SRPMS:" |
59 | ls SRPMS | |
60 | echo "RPMS/i386:" | |
61 | ls RPMS/i386 | |
62 | ||
63 | cp $RPM_ROOT/SRPMS/*.rpm $WXDEST | |
64 | cp $RPM_ROOT/RPMS/*.rpm $WXDEST | |
65 | cp $WXDEST/wxgtk/release/*.tar.gz $WXDEST | |
66 | cp $WXDEST/wxgtk/release/*.tar.bz2 $WXDEST | |
67 | ||
789f8e6a JS |
68 | rm -f -r $WXDEST/wxgtk |
69 | ||
70 | echo Now try the RPMs with rpm -i. | |
71 | } | |
72 | ||
73 | dospinwxmotif() | |
74 | { | |
75 | echo Making wxMotif RPMs... | |
76 | RPM_ROOT=$WXDEST/wxmotif/rpm-root | |
77 | ||
78 | if [ ! -d $WXDEST ]; then | |
79 | mkdir $WXDEST | |
80 | fi | |
81 | ||
82 | rm -f -r $WXDEST/wxmotif | |
83 | mkdir $WXDEST/wxmotif | |
84 | mkdir $WXDEST/wxmotif/release | |
85 | mkdir $RPM_ROOT | |
86 | ||
87 | cd $WXSRC | |
88 | cd locale | |
89 | make allmo | |
90 | cd $WXDEST/wxmotif/release | |
91 | echo Configuring... | |
92 | $WXSRC/configure --with-motif --no-recursion | |
93 | echo Making... | |
94 | make -j1 dist bzip-dist-only | |
95 | ||
96 | echo Setting up RPM build dir $RPM_ROOT... | |
97 | rm -f -r $RPM_ROOT | |
98 | mkdir $RPM_ROOT | |
99 | mkdir $RPM_ROOT/BUILD | |
100 | mkdir $RPM_ROOT/RPMS | |
101 | mkdir $RPM_ROOT/RPMS/i386 | |
102 | mkdir $RPM_ROOT/RPMS/i686 | |
103 | mkdir $RPM_ROOT/RPMS/noarch | |
104 | mkdir $RPM_ROOT/SOURCES | |
105 | mkdir $RPM_ROOT/SPECS | |
106 | mkdir $RPM_ROOT/SRPMS | |
107 | ||
108 | echo %_topdir $RPM_ROOT > ~/.rpmmacros | |
109 | ||
110 | echo Copying wxMOTIF-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES... | |
111 | cp wxMOTIF-$WXVER.tar.bz2 $RPM_ROOT/SOURCES | |
112 | echo Copying wxMotif.spec to $RPM_ROOT/SPECS... | |
113 | cp $WXSRC/wxMotif.spec $RPM_ROOT/SPECS | |
114 | ||
115 | echo Starting wxMotif RPM build... | |
116 | cd $RPM_ROOT | |
117 | rpmbuild -ba SPECS/wxMotif.spec 2>&1 | tee wxGTK.out | |
118 | ||
119 | echo Finished wxMotif RPM build, in $RPM_ROOT. | |
120 | echo "SRPMS:" | |
121 | ls SRPMS | |
122 | echo "RPMS/i386:" | |
123 | ls RPMS/i386 | |
124 | ||
125 | cp $RPM_ROOT/SRPMS/*.rpm $WXDEST | |
126 | cp $RPM_ROOT/RPMS/*.rpm $WXDEST | |
127 | cp $WXDEST/wxmotif/release/*.tar.gz $WXDEST | |
128 | cp $WXDEST/wxmotif/release/*.tar.bz2 $WXDEST | |
129 | ||
130 | echo Rearchiving wxMotif tarballs to change wxMOTIF to wxMotif... | |
131 | cd $WXDEST | |
132 | mkdir wxMotif.tmp | |
133 | cd wxMotif.tmp | |
134 | rm -f -r * | |
135 | tar xfz ../wxMOTIF-$WXVER.tar.gz | |
136 | mv wxMOTIF-$WXVER wxMotif-$WXVER | |
137 | rm -f ../wxMOTIF-$WXVER.tar.gz | |
138 | rm -f ../wxMOTIF-$WXVER.tar.bz2 | |
139 | tar cf ../wxMotif-$WXVER.tar * | |
140 | gzip -c ../wxMotif-$WXVER.tar > ../wxMotif-$WXVER.tar.gz | |
141 | bzip2 -f9 ../wxMotif-$WXVER.tar | |
142 | cd .. | |
143 | rm -f -r wxMotif.tmp | |
144 | rm -f -r $WXDEST/wxmotif | |
145 | ||
146 | echo Now try the RPMs with rpm -i. | |
147 | } | |
148 | ||
149 | dospinwxmac() | |
150 | { | |
151 | echo Making wxMac tarballs... | |
152 | echo Note that this must be done on a Mac. | |
153 | if [ ! -d $WXDEST ]; then | |
154 | mkdir $WXDEST | |
155 | fi | |
156 | ||
157 | rm -f -r $WXDEST/wxmac | |
158 | mkdir $WXDEST/wxmac | |
159 | mkdir $WXDEST/wxmac/release | |
160 | ||
161 | cd $WXSRC | |
162 | cd locale | |
163 | make allmo | |
164 | cd $WXDEST/wxmac/release | |
165 | echo Configuring... | |
166 | $WXSRC/configure --with-mac --no-recursion | |
167 | echo Making... | |
168 | make -j1 dist bzip-dist-only | |
169 | ||
170 | cp $WXDEST/wxmac/release/*.tar.gz $WXDEST | |
171 | cp $WXDEST/wxmac/release/*.tar.bz2 $WXDEST | |
172 | ||
173 | echo Rearchiving wxMac tarballs to change wxMAC to wxMAC... | |
174 | cd $WXDEST | |
175 | mkdir wxMac.tmp | |
176 | cd wxMac.tmp | |
177 | rm -f -r * | |
178 | tar xfz ../wxMac-$WXVER.tar.gz | |
179 | mv wxMAC-$WXVER wxMac-$WXVER | |
180 | rm -f ../wxMAC-$WXVER.tar.gz | |
181 | rm -f ../wxMAC-$WXVER.tar.bz2 | |
182 | tar cf ../wxMac-$WXVER.tar * | |
183 | gzip -c ../wxMac-$WXVER.tar > ../wxMac-$WXVER.tar.gz | |
184 | bzip2 -f9 ../wxMac-$WXVER.tar | |
185 | cd .. | |
186 | rm -f -r wxMac.tmp | |
187 | ||
188 | rm -f -r $WXDEST/wxmac | |
db0834fa JS |
189 | echo Now try the RPMs with rpm -i. |
190 | } | |
191 | ||
192 | dospinwxbase() | |
193 | { | |
194 | echo Making wxBase RPMs... | |
195 | RPM_ROOT=$WXDEST/wxbase/rpm-root | |
196 | ||
197 | if [ ! -d $WXDEST ]; then | |
198 | mkdir $WXDEST | |
199 | fi | |
200 | ||
201 | rm -f -r $WXDEST/wxbase | |
202 | mkdir $WXDEST/wxbase | |
203 | mkdir $WXDEST/wxbase/release | |
204 | mkdir $RPM_ROOT | |
205 | ||
206 | cd $WXSRC | |
207 | cd locale | |
208 | make allmo | |
209 | cd $WXDEST/wxbase/release | |
210 | echo Configuring... | |
211 | $WXSRC/configure --disable-gui --no-recursion | |
212 | echo Making... | |
213 | make -j1 dist bzip-dist-only | |
214 | ||
215 | echo Setting up RPM build dir $RPM_ROOT... | |
216 | rm -f -r $RPM_ROOT | |
217 | mkdir $RPM_ROOT | |
218 | mkdir $RPM_ROOT/BUILD | |
219 | mkdir $RPM_ROOT/RPMS | |
220 | mkdir $RPM_ROOT/RPMS/i386 | |
221 | mkdir $RPM_ROOT/RPMS/i686 | |
222 | mkdir $RPM_ROOT/RPMS/noarch | |
223 | mkdir $RPM_ROOT/SOURCES | |
224 | mkdir $RPM_ROOT/SPECS | |
225 | mkdir $RPM_ROOT/SRPMS | |
226 | ||
227 | echo %_topdir $RPM_ROOT > ~/.rpmmacros | |
228 | ||
229 | echo Copying wxBase-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES... | |
230 | cp wxBase-$WXVER.tar.bz2 $RPM_ROOT/SOURCES | |
231 | echo Copying wxBase.spec to $RPM_ROOT/SPECS... | |
232 | cp $WXSRC/wxBase.spec $RPM_ROOT/SPECS | |
233 | ||
234 | echo Starting wxBase RPM build... | |
235 | cd $RPM_ROOT | |
236 | rpmbuild -ba SPECS/wxBase.spec 2>&1 | tee wxBase.out | |
237 | ||
238 | echo Finished wxBase RPM build, in $RPM_ROOT. | |
239 | echo "SRPMS:" | |
240 | ls SRPMS | |
241 | echo "RPMS/i386:" | |
242 | ls RPMS/i386 | |
243 | ||
244 | cp $RPM_ROOT/SRPMS/*.rpm $WXDEST | |
245 | cp $RPM_ROOT/RPMS/*.rpm $WXDEST | |
246 | cp $WXDEST/wxbase/release/*.tar.gz $WXDEST | |
247 | cp $WXDEST/wxbase/release/*.tar.bz2 $WXDEST | |
248 | ||
789f8e6a | 249 | rm -f -r $WXDEST/wxbase |
db0834fa JS |
250 | echo Now try the RPMs with rpm -i. |
251 | } | |
252 | ||
253 | dospinwxx11() | |
254 | { | |
255 | echo Making wxX11 RPMs... | |
256 | RPM_ROOT=$WXDEST/wxx11/rpm-root | |
257 | ||
258 | if [ ! -d $WXDEST ]; then | |
259 | mkdir $WXDEST | |
260 | fi | |
261 | ||
262 | rm -f -r $WXDEST/wxx11 | |
263 | mkdir $WXDEST/wxx11 | |
264 | mkdir $WXDEST/wxx11/release | |
265 | mkdir $RPM_ROOT | |
266 | ||
267 | cd $WXSRC | |
268 | cd locale | |
269 | make allmo | |
270 | cd $WXDEST/wxx11/release | |
271 | echo Configuring... | |
272 | $WXSRC/configure --with-x11 --no-recursion | |
273 | echo Making... | |
274 | make -j1 dist bzip-dist-only | |
275 | ||
276 | echo Setting up RPM build dir $RPM_ROOT... | |
277 | rm -f -r $RPM_ROOT | |
278 | mkdir $RPM_ROOT | |
279 | mkdir $RPM_ROOT/BUILD | |
280 | mkdir $RPM_ROOT/RPMS | |
281 | mkdir $RPM_ROOT/RPMS/i386 | |
282 | mkdir $RPM_ROOT/RPMS/i686 | |
283 | mkdir $RPM_ROOT/RPMS/noarch | |
284 | mkdir $RPM_ROOT/SOURCES | |
285 | mkdir $RPM_ROOT/SPECS | |
286 | mkdir $RPM_ROOT/SRPMS | |
287 | ||
288 | echo %_topdir $RPM_ROOT > ~/.rpmmacros | |
289 | ||
290 | echo Copying wxX11-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES... | |
291 | cp wxX11-$WXVER.tar.bz2 $RPM_ROOT/SOURCES | |
292 | echo Copying wxX11.spec to $RPM_ROOT/SPECS... | |
293 | cp $WXSRC/wxX11.spec $RPM_ROOT/SPECS | |
294 | ||
295 | echo Starting wxX11 RPM build... | |
296 | cd $RPM_ROOT | |
297 | rpmbuild -ba SPECS/wxX11.spec 2>&1 | tee wxX11.out | |
298 | ||
299 | echo Finished wxX11 RPM build, in $RPM_ROOT. | |
300 | echo "SRPMS:" | |
301 | ls SRPMS | |
302 | echo "RPMS/i386:" | |
303 | ls RPMS/i386 | |
304 | ||
305 | cp $RPM_ROOT/SRPMS/*.rpm $WXDEST | |
306 | cp $RPM_ROOT/RPMS/*.rpm $WXDEST | |
307 | cp $WXDEST/wxx11/release/*.tar.gz $WXDEST | |
308 | cp $WXDEST/wxx11/release/*.tar.bz2 $WXDEST | |
309 | ||
789f8e6a | 310 | rm -f -r $WXDEST/wxx11 |
db0834fa JS |
311 | echo Now try the RPMs with rpm -i. |
312 | } | |
313 | ||
db0834fa JS |
314 | PROGNAME=$0 |
315 | WXSRC=$1 | |
316 | WXDEST=$2 | |
317 | WXVER=$3 | |
318 | ||
319 | SPINWXX11=0 | |
320 | SPINWXGTK=0 | |
789f8e6a JS |
321 | SPINWXMAC=0 |
322 | SPINWXMOTIF=0 | |
db0834fa JS |
323 | SPINWXBASE=0 |
324 | SPINEVERYTHING=0 | |
325 | UPDATECVS=0 | |
326 | ||
327 | usage() | |
328 | { | |
329 | echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]" | |
330 | echo Options: | |
331 | echo " --help Display this help message" | |
332 | echo " --wxgtk Spin wxGTK RPMs" | |
333 | echo " --wxbase Spin wxBase RPMs" | |
334 | echo " --wxx11 Spin wxX11 RPMs" | |
789f8e6a JS |
335 | echo " --wxmotif Spin wxMotif RPMs" |
336 | echo " --wxmac Make wxMac tarball" | |
db0834fa JS |
337 | echo " --all Spin EVERYTHING" |
338 | echo " --updatecvs Update from CVS" | |
339 | ||
340 | exit 1 | |
341 | } | |
342 | ||
3885ccc5 JS |
343 | init="" |
344 | if [ "$1" = "" ] | |
345 | then | |
346 | usage | |
347 | exit | |
348 | fi | |
349 | ||
350 | if [ "$2" = "" ] | |
351 | then | |
352 | usage | |
353 | exit | |
354 | fi | |
355 | ||
356 | if [ "$3" = "" ] | |
357 | then | |
358 | usage | |
359 | exit | |
360 | fi | |
361 | ||
db0834fa JS |
362 | # Process command line options. |
363 | shift 3 | |
364 | for i in "$@"; do | |
365 | case "$i" in | |
366 | --wxx11) SPINWXX11=1 ;; | |
367 | --wxgtk) SPINWXGTK=1 ;; | |
789f8e6a JS |
368 | --wxmotif) SPINWXMOTIF=1 ;; |
369 | --wxmac) SPINWXMAC=1 ;; | |
db0834fa JS |
370 | --wxbase) SPINWXBASE=1 ;; |
371 | --all) SPINEVERYTHING=1 ;; | |
372 | --updatecvs) UPDATECVS=1 ;; | |
373 | *) | |
374 | usage | |
375 | exit | |
376 | ;; | |
377 | esac | |
378 | done | |
379 | ||
380 | echo About to make wxWindows RPMs: | |
381 | echo From $WXSRC | |
382 | echo To $WXDEST | |
383 | echo Version $WXVER | |
384 | echo CTRL-C if this is not correct. | |
385 | read dummy | |
386 | ||
387 | if [ "$UPDATECVS" = "1" ]; then | |
388 | doupdatecvs | |
389 | fi | |
390 | ||
391 | if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
392 | dospinwxx11 | |
393 | fi | |
394 | ||
395 | if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
396 | dospinwxgtk | |
397 | fi | |
398 | ||
399 | if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
400 | dospinwxbase | |
401 | fi | |
402 | ||
789f8e6a JS |
403 | if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then |
404 | dospinwxmotif | |
405 | fi | |
406 | ||
407 | if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
408 | dospinwxmac | |
409 | fi | |
410 |