]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/makerpm
Save a reference to the async sound object
[wxWidgets.git] / distrib / msw / makerpm
CommitLineData
db0834fa 1#!/bin/sh
77ffb593 2# Makes the wxWidgets RPMs
db0834fa 3
42d9875b
JS
4RPMBUILDARGS=
5PLATFORM=
6
db0834fa
JS
7doupdatecvs()
8{
9 cd $WXSRC
10 echo Updating from CVS...
11 cvswx update -d -P
12}
13
14dospinwxgtk()
15{
16 echo Making wxGTK RPMs...
17 RPM_ROOT=$WXDEST/wxgtk/rpm-root
18
19 if [ ! -d $WXDEST ]; then
20 mkdir $WXDEST
21 fi
22
23 rm -f -r $WXDEST/wxgtk
24 mkdir $WXDEST/wxgtk
25 mkdir $WXDEST/wxgtk/release
26 mkdir $RPM_ROOT
27
28 cd $WXSRC
29 cd locale
30 make allmo
31 cd $WXDEST/wxgtk/release
32 echo Configuring...
789f8e6a 33 $WXSRC/configure --with-gtk --no-recursion
db0834fa
JS
34 echo Making...
35 make -j1 dist bzip-dist-only
36
37 echo Setting up RPM build dir $RPM_ROOT...
38 rm -f -r $RPM_ROOT
39 mkdir $RPM_ROOT
40 mkdir $RPM_ROOT/BUILD
41 mkdir $RPM_ROOT/RPMS
42 mkdir $RPM_ROOT/RPMS/i386
43 mkdir $RPM_ROOT/RPMS/i686
44 mkdir $RPM_ROOT/RPMS/noarch
45 mkdir $RPM_ROOT/SOURCES
46 mkdir $RPM_ROOT/SPECS
47 mkdir $RPM_ROOT/SRPMS
48
49 echo %_topdir $RPM_ROOT > ~/.rpmmacros
50
51 echo Copying wxGTK-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
52 cp wxGTK-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
53 echo Copying wxGTK.spec to $RPM_ROOT/SPECS...
54 cp $WXSRC/wxGTK.spec $RPM_ROOT/SPECS
55
42d9875b 56 echo Starting wxGTK RPM build, rpmbuild args=$RPMBUILDARGS...
db0834fa 57 cd $RPM_ROOT
42d9875b 58 rpmbuild -ba $RPMBUILDARGS SPECS/wxGTK.spec 2>&1 | tee wxGTK.out
db0834fa 59
789f8e6a 60 echo Finished wxGTK RPM build, in $RPM_ROOT.
db0834fa
JS
61 echo "SRPMS:"
62 ls SRPMS
63 echo "RPMS/i386:"
64 ls RPMS/i386
65
42d9875b 66 mkdir $WXDEST/$PLATFORM
db0834fa 67
42d9875b
JS
68 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST/$PLATFORM
69 cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST/$PLATFORM
70 cp $WXDEST/wxgtk/release/*.tar.gz $WXDEST/$PLATFORM
71 cp $WXDEST/wxgtk/release/*.tar.bz2 $WXDEST/$PLATFORM
72
73# rm -f -r $WXDEST/wxgtk
789f8e6a
JS
74
75 echo Now try the RPMs with rpm -i.
76}
77
b2cef830
JS
78dospinwxmgl()
79{
80 echo Making wxMGL RPMs...
81 RPM_ROOT=$WXDEST/wxmgl/rpm-root
b2cef830
JS
82
83 if [ ! -d $WXDEST ]; then
84 mkdir $WXDEST
85 fi
86
87 rm -f -r $WXDEST/wxmgl
88 mkdir $WXDEST/wxmgl
89 mkdir $WXDEST/wxmgl/release
90 mkdir $RPM_ROOT
91
92 cd $WXSRC
93 cd locale
94 make allmo
95 cd $WXDEST/wxmgl/release
96 echo Configuring...
97 $WXSRC/configure --with-mgl --no-recursion
98 echo Making...
99 make -j1 dist bzip-dist-only
100
101 echo Setting up RPM build dir $RPM_ROOT...
102 rm -f -r $RPM_ROOT
103 mkdir $RPM_ROOT
104 mkdir $RPM_ROOT/BUILD
105 mkdir $RPM_ROOT/RPMS
106 mkdir $RPM_ROOT/RPMS/i386
107 mkdir $RPM_ROOT/RPMS/i686
108 mkdir $RPM_ROOT/RPMS/noarch
109 mkdir $RPM_ROOT/SOURCES
110 mkdir $RPM_ROOT/SPECS
111 mkdir $RPM_ROOT/SRPMS
112
113 echo %_topdir $RPM_ROOT > ~/.rpmmacros
114
115 echo Copying wxMGL-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
116 cp wxMGL-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
117 echo Copying wxMGL.spec to $RPM_ROOT/SPECS...
118 cp $WXSRC/wxMGL.spec $RPM_ROOT/SPECS
119
120 echo Starting wxMGL RPM build...
121 cd $RPM_ROOT
122 rpmbuild -ba SPECS/wxMGL.spec 2>&1 | tee wxMGL.out
123
124 echo Finished wxMGL RPM build, in $RPM_ROOT.
125 echo "SRPMS:"
126 ls SRPMS
127 echo "RPMS/i386:"
128 ls RPMS/i386
129
130 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
42d9875b 131 cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST
b2cef830
JS
132 cp $WXDEST/wxmgl/release/*.tar.gz $WXDEST
133 cp $WXDEST/wxmgl/release/*.tar.bz2 $WXDEST
134
42d9875b 135# rm -f -r $WXDEST/wxmgl
b2cef830
JS
136
137 echo Now try the RPMs with rpm -i.
138}
139
789f8e6a
JS
140dospinwxmotif()
141{
142 echo Making wxMotif RPMs...
143 RPM_ROOT=$WXDEST/wxmotif/rpm-root
144
145 if [ ! -d $WXDEST ]; then
146 mkdir $WXDEST
147 fi
148
149 rm -f -r $WXDEST/wxmotif
150 mkdir $WXDEST/wxmotif
151 mkdir $WXDEST/wxmotif/release
152 mkdir $RPM_ROOT
153
154 cd $WXSRC
155 cd locale
156 make allmo
157 cd $WXDEST/wxmotif/release
158 echo Configuring...
159 $WXSRC/configure --with-motif --no-recursion
160 echo Making...
161 make -j1 dist bzip-dist-only
162
163 echo Setting up RPM build dir $RPM_ROOT...
164 rm -f -r $RPM_ROOT
165 mkdir $RPM_ROOT
166 mkdir $RPM_ROOT/BUILD
167 mkdir $RPM_ROOT/RPMS
168 mkdir $RPM_ROOT/RPMS/i386
169 mkdir $RPM_ROOT/RPMS/i686
170 mkdir $RPM_ROOT/RPMS/noarch
171 mkdir $RPM_ROOT/SOURCES
172 mkdir $RPM_ROOT/SPECS
173 mkdir $RPM_ROOT/SRPMS
174
175 echo %_topdir $RPM_ROOT > ~/.rpmmacros
176
177 echo Copying wxMOTIF-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
178 cp wxMOTIF-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
179 echo Copying wxMotif.spec to $RPM_ROOT/SPECS...
180 cp $WXSRC/wxMotif.spec $RPM_ROOT/SPECS
181
182 echo Starting wxMotif RPM build...
183 cd $RPM_ROOT
184 rpmbuild -ba SPECS/wxMotif.spec 2>&1 | tee wxGTK.out
185
186 echo Finished wxMotif RPM build, in $RPM_ROOT.
187 echo "SRPMS:"
188 ls SRPMS
189 echo "RPMS/i386:"
190 ls RPMS/i386
191
192 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
42d9875b 193 cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST
789f8e6a
JS
194 cp $WXDEST/wxmotif/release/*.tar.gz $WXDEST
195 cp $WXDEST/wxmotif/release/*.tar.bz2 $WXDEST
196
197 echo Rearchiving wxMotif tarballs to change wxMOTIF to wxMotif...
198 cd $WXDEST
199 mkdir wxMotif.tmp
200 cd wxMotif.tmp
201 rm -f -r *
202 tar xfz ../wxMOTIF-$WXVER.tar.gz
203 mv wxMOTIF-$WXVER wxMotif-$WXVER
204 rm -f ../wxMOTIF-$WXVER.tar.gz
205 rm -f ../wxMOTIF-$WXVER.tar.bz2
206 tar cf ../wxMotif-$WXVER.tar *
207 gzip -c ../wxMotif-$WXVER.tar > ../wxMotif-$WXVER.tar.gz
208 bzip2 -f9 ../wxMotif-$WXVER.tar
209 cd ..
210 rm -f -r wxMotif.tmp
42d9875b 211# rm -f -r $WXDEST/wxmotif
789f8e6a
JS
212
213 echo Now try the RPMs with rpm -i.
214}
215
216dospinwxmac()
217{
218 echo Making wxMac tarballs...
219 echo Note that this must be done on a Mac.
220 if [ ! -d $WXDEST ]; then
221 mkdir $WXDEST
222 fi
223
224 rm -f -r $WXDEST/wxmac
225 mkdir $WXDEST/wxmac
226 mkdir $WXDEST/wxmac/release
227
228 cd $WXSRC
229 cd locale
230 make allmo
231 cd $WXDEST/wxmac/release
232 echo Configuring...
233 $WXSRC/configure --with-mac --no-recursion
234 echo Making...
235 make -j1 dist bzip-dist-only
236
237 cp $WXDEST/wxmac/release/*.tar.gz $WXDEST
238 cp $WXDEST/wxmac/release/*.tar.bz2 $WXDEST
239
240 echo Rearchiving wxMac tarballs to change wxMAC to wxMAC...
241 cd $WXDEST
242 mkdir wxMac.tmp
243 cd wxMac.tmp
244 rm -f -r *
245 tar xfz ../wxMac-$WXVER.tar.gz
246 mv wxMAC-$WXVER wxMac-$WXVER
247 rm -f ../wxMAC-$WXVER.tar.gz
248 rm -f ../wxMAC-$WXVER.tar.bz2
249 tar cf ../wxMac-$WXVER.tar *
250 gzip -c ../wxMac-$WXVER.tar > ../wxMac-$WXVER.tar.gz
251 bzip2 -f9 ../wxMac-$WXVER.tar
252 cd ..
253 rm -f -r wxMac.tmp
254
255 rm -f -r $WXDEST/wxmac
db0834fa
JS
256 echo Now try the RPMs with rpm -i.
257}
258
259dospinwxbase()
260{
261 echo Making wxBase RPMs...
262 RPM_ROOT=$WXDEST/wxbase/rpm-root
263
264 if [ ! -d $WXDEST ]; then
265 mkdir $WXDEST
266 fi
267
268 rm -f -r $WXDEST/wxbase
269 mkdir $WXDEST/wxbase
270 mkdir $WXDEST/wxbase/release
271 mkdir $RPM_ROOT
272
273 cd $WXSRC
274 cd locale
275 make allmo
276 cd $WXDEST/wxbase/release
277 echo Configuring...
278 $WXSRC/configure --disable-gui --no-recursion
279 echo Making...
280 make -j1 dist bzip-dist-only
281
282 echo Setting up RPM build dir $RPM_ROOT...
283 rm -f -r $RPM_ROOT
284 mkdir $RPM_ROOT
285 mkdir $RPM_ROOT/BUILD
286 mkdir $RPM_ROOT/RPMS
287 mkdir $RPM_ROOT/RPMS/i386
288 mkdir $RPM_ROOT/RPMS/i686
289 mkdir $RPM_ROOT/RPMS/noarch
290 mkdir $RPM_ROOT/SOURCES
291 mkdir $RPM_ROOT/SPECS
292 mkdir $RPM_ROOT/SRPMS
293
294 echo %_topdir $RPM_ROOT > ~/.rpmmacros
295
296 echo Copying wxBase-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
297 cp wxBase-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
298 echo Copying wxBase.spec to $RPM_ROOT/SPECS...
299 cp $WXSRC/wxBase.spec $RPM_ROOT/SPECS
300
f16e8dc9 301 echo Starting wxBase RPM build, rpmbuild args=$RPMBUILDARGS...
db0834fa 302 cd $RPM_ROOT
f16e8dc9 303 rpmbuild -ba $RPMBUILDARGS SPECS/wxBase.spec 2>&1 | tee wxBase.out
db0834fa
JS
304
305 echo Finished wxBase RPM build, in $RPM_ROOT.
306 echo "SRPMS:"
307 ls SRPMS
308 echo "RPMS/i386:"
309 ls RPMS/i386
310
f16e8dc9
JS
311 mkdir $WXDEST/$PLATFORM
312
313 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST/$PLATFORM
314 cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST/$PLATFORM
315 cp $WXDEST/wxbase/release/*.tar.gz $WXDEST/$PLATFORM
316 cp $WXDEST/wxbase/release/*.tar.bz2 $WXDEST/$PLATFORM
db0834fa 317
42d9875b 318# rm -f -r $WXDEST/wxbase
db0834fa
JS
319 echo Now try the RPMs with rpm -i.
320}
321
322dospinwxx11()
323{
324 echo Making wxX11 RPMs...
325 RPM_ROOT=$WXDEST/wxx11/rpm-root
326
327 if [ ! -d $WXDEST ]; then
328 mkdir $WXDEST
329 fi
330
331 rm -f -r $WXDEST/wxx11
332 mkdir $WXDEST/wxx11
333 mkdir $WXDEST/wxx11/release
334 mkdir $RPM_ROOT
335
336 cd $WXSRC
337 cd locale
338 make allmo
339 cd $WXDEST/wxx11/release
340 echo Configuring...
341 $WXSRC/configure --with-x11 --no-recursion
342 echo Making...
343 make -j1 dist bzip-dist-only
344
345 echo Setting up RPM build dir $RPM_ROOT...
346 rm -f -r $RPM_ROOT
347 mkdir $RPM_ROOT
348 mkdir $RPM_ROOT/BUILD
349 mkdir $RPM_ROOT/RPMS
350 mkdir $RPM_ROOT/RPMS/i386
351 mkdir $RPM_ROOT/RPMS/i686
352 mkdir $RPM_ROOT/RPMS/noarch
353 mkdir $RPM_ROOT/SOURCES
354 mkdir $RPM_ROOT/SPECS
355 mkdir $RPM_ROOT/SRPMS
356
357 echo %_topdir $RPM_ROOT > ~/.rpmmacros
358
359 echo Copying wxX11-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
360 cp wxX11-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
361 echo Copying wxX11.spec to $RPM_ROOT/SPECS...
362 cp $WXSRC/wxX11.spec $RPM_ROOT/SPECS
363
364 echo Starting wxX11 RPM build...
365 cd $RPM_ROOT
366 rpmbuild -ba SPECS/wxX11.spec 2>&1 | tee wxX11.out
367
368 echo Finished wxX11 RPM build, in $RPM_ROOT.
369 echo "SRPMS:"
370 ls SRPMS
371 echo "RPMS/i386:"
372 ls RPMS/i386
373
374 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
42d9875b 375 cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST
db0834fa
JS
376 cp $WXDEST/wxx11/release/*.tar.gz $WXDEST
377 cp $WXDEST/wxx11/release/*.tar.bz2 $WXDEST
378
42d9875b 379# rm -f -r $WXDEST/wxx11
db0834fa
JS
380 echo Now try the RPMs with rpm -i.
381}
382
db0834fa
JS
383PROGNAME=$0
384WXSRC=$1
385WXDEST=$2
386WXVER=$3
387
388SPINWXX11=0
42d9875b
JS
389SPINWXGTK1=0
390SPINWXGTK2=0
391SPINWXGTK2UNICODE=0
789f8e6a
JS
392SPINWXMAC=0
393SPINWXMOTIF=0
db0834fa 394SPINWXBASE=0
f16e8dc9 395SPINWXBASEUNICODE=0
b2cef830 396SPINWXMGL=0
db0834fa
JS
397SPINEVERYTHING=0
398UPDATECVS=0
399
400usage()
401{
402 echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]"
403 echo Options:
42d9875b
JS
404 echo " --help Display this help message"
405 echo " --wxgtk1 Spin wxGTK1 RPMs"
406 echo " --wxgtk2 Spin wxGTK2 RPMs"
407 echo " --wxgtk2unicode Spin wxGTK2 Unicode RPMs"
408 echo " --wxbase Spin wxBase RPMs"
f16e8dc9 409 echo " --wxbaseunicode Spin wxBase Unicode RPMs"
42d9875b
JS
410 echo " --wxx11 Spin wxX11 RPMs"
411 echo " --wxmotif Spin wxMotif RPMs"
412 echo " --wxmgl Spin wxMGL RPMs"
413 echo " --wxmac Make wxMac tarball"
414 echo " --all Spin EVERYTHING"
415 echo " --updatecvs Update from CVS"
db0834fa
JS
416
417 exit 1
418}
419
3885ccc5
JS
420init=""
421if [ "$1" = "" ]
422then
423 usage
424 exit
425fi
426
427if [ "$2" = "" ]
428then
429 usage
430 exit
431fi
432
433if [ "$3" = "" ]
434then
435 usage
436 exit
437fi
438
db0834fa
JS
439# Process command line options.
440shift 3
441for i in "$@"; do
442 case "$i" in
443 --wxx11) SPINWXX11=1 ;;
42d9875b
JS
444 --wxgtk1) SPINWXGTK1=1 ;;
445 --wxgtk2) SPINWXGTK2=1 ;;
446 --wxgtk2unicode) SPINWXGTK2UNICODE=1 ;;
789f8e6a 447 --wxmotif) SPINWXMOTIF=1 ;;
b2cef830 448 --wxmgl) SPINWXMGL=1 ;;
789f8e6a 449 --wxmac) SPINWXMAC=1 ;;
db0834fa 450 --wxbase) SPINWXBASE=1 ;;
f16e8dc9 451 --wxbaseunicode) SPINWXBASEUNICODE=1 ;;
db0834fa
JS
452 --all) SPINEVERYTHING=1 ;;
453 --updatecvs) UPDATECVS=1 ;;
454 *)
455 usage
456 exit
457 ;;
458 esac
459done
460
77ffb593 461echo About to make wxWidgets RPMs:
db0834fa
JS
462echo From $WXSRC
463echo To $WXDEST
464echo Version $WXVER
465echo CTRL-C if this is not correct.
466read dummy
467
468if [ "$UPDATECVS" = "1" ]; then
469 doupdatecvs
470fi
471
472if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
473 dospinwxx11
474fi
475
42d9875b
JS
476if [ "$SPINWXGTK1" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
477 RPMBUILDARGS=
478 PLATFORM=gtk1
479 dospinwxgtk
480fi
481
482if [ "$SPINWXGTK2" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
483 RPMBUILDARGS="--with gtk2"
484 PLATFORM=gtk2
485 dospinwxgtk
486fi
487
488if [ "$SPINWXGTK2UNICODE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
489 RPMBUILDARGS="--with gtk2 --with unicode"
490 PLATFORM=gtk2unicode
db0834fa
JS
491 dospinwxgtk
492fi
493
494if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
f16e8dc9
JS
495 PLATFORM=base
496 dospinwxbase
497fi
498
499if [ "$SPINWXBASEUNICODE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
500 RPMBUILDARGS="--with unicode"
501 PLATFORM=baseunicode
db0834fa
JS
502 dospinwxbase
503fi
504
789f8e6a
JS
505if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
506 dospinwxmotif
507fi
508
b2cef830
JS
509if [ "$SPINWXMGL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
510 dospinwxmgl
511fi
512
4c7848f1 513if [ "$SPINWXMAC" = "1" ]; then
789f8e6a
JS
514 dospinwxmac
515fi
516