2 # Makes the wxWidgets RPMs
11 echo Updating from CVS...
17 echo Making wxGTK RPMs...
18 RPM_ROOT
=$WXDEST/wxgtk
/rpm
-root
20 if [ ! -d $WXDEST ]; then
24 rm -f -r $WXDEST/wxgtk
26 mkdir $WXDEST/wxgtk
/release
32 cd $WXDEST/wxgtk
/release
34 $WXSRC/configure
--with-gtk --no-recursion
36 make -j1 dist bzip
-dist-only
38 mkdir $WXDEST/$PLATFORM
40 if [ "$NORPMS" != "1" ]
43 echo Setting up RPM build dir
$RPM_ROOT...
48 mkdir $RPM_ROOT/RPMS
/i386
49 mkdir $RPM_ROOT/RPMS
/i686
50 mkdir $RPM_ROOT/RPMS
/noarch
51 mkdir $RPM_ROOT/SOURCES
55 echo %_topdir
$RPM_ROOT > ~
/.rpmmacros
57 echo Copying wxGTK
-$WXVER.
tar.bz2 to
$RPM_ROOT/SOURCES...
58 cp wxGTK
-$WXVER.
tar.bz2
$RPM_ROOT/SOURCES
59 echo Copying wxGTK.spec to
$RPM_ROOT/SPECS...
60 cp $WXSRC/wxGTK.spec
$RPM_ROOT/SPECS
62 echo Starting wxGTK RPM build
, rpmbuild args
=$RPMBUILDARGS...
64 rpmbuild
-ba $RPMBUILDARGS SPECS
/wxGTK.spec
2>&1 | tee wxGTK.out
66 echo Finished wxGTK RPM build
, in $RPM_ROOT.
72 cp $RPM_ROOT/SRPMS
/*.rpm
$WXDEST/$PLATFORM
73 cp $RPM_ROOT/RPMS
/i
386/*.rpm
$WXDEST/$PLATFORM
77 cp $WXDEST/wxgtk
/release
/*.
tar.gz
$WXDEST/$PLATFORM
78 cp $WXDEST/wxgtk
/release
/*.
tar.bz2
$WXDEST/$PLATFORM
80 # rm -f -r $WXDEST/wxgtk
82 echo Now try the RPMs with rpm
-i.
87 echo Making wxMGL RPMs...
88 RPM_ROOT
=$WXDEST/wxmgl
/rpm
-root
90 if [ ! -d $WXDEST ]; then
94 rm -f -r $WXDEST/wxmgl
96 mkdir $WXDEST/wxmgl
/release
102 cd $WXDEST/wxmgl
/release
104 $WXSRC/configure
--with-mgl --no-recursion
106 make -j1 dist bzip
-dist-only
108 if [ "$NORPMS" != "1" ]
111 echo Setting up RPM build dir
$RPM_ROOT...
114 mkdir $RPM_ROOT/BUILD
116 mkdir $RPM_ROOT/RPMS
/i386
117 mkdir $RPM_ROOT/RPMS
/i686
118 mkdir $RPM_ROOT/RPMS
/noarch
119 mkdir $RPM_ROOT/SOURCES
120 mkdir $RPM_ROOT/SPECS
121 mkdir $RPM_ROOT/SRPMS
123 echo %_topdir
$RPM_ROOT > ~
/.rpmmacros
125 echo Copying wxMGL
-$WXVER.
tar.bz2 to
$RPM_ROOT/SOURCES...
126 cp wxMGL
-$WXVER.
tar.bz2
$RPM_ROOT/SOURCES
127 echo Copying wxMGL.spec to
$RPM_ROOT/SPECS...
128 cp $WXSRC/wxMGL.spec
$RPM_ROOT/SPECS
130 echo Starting wxMGL RPM build...
132 rpmbuild
-ba SPECS
/wxMGL.spec
2>&1 | tee wxMGL.out
134 echo Finished wxMGL RPM build
, in $RPM_ROOT.
140 cp $RPM_ROOT/SRPMS
/*.rpm
$WXDEST
141 cp $RPM_ROOT/RPMS
/i
386/*.rpm
$WXDEST
145 cp $WXDEST/wxmgl
/release
/*.
tar.gz
$WXDEST
146 cp $WXDEST/wxmgl
/release
/*.
tar.bz2
$WXDEST
148 # rm -f -r $WXDEST/wxmgl
150 echo Now try the RPMs with rpm
-i.
155 echo Making wxMotif RPMs...
156 RPM_ROOT
=$WXDEST/wxmotif
/rpm
-root
158 if [ ! -d $WXDEST ]; then
162 rm -f -r $WXDEST/wxmotif
163 mkdir $WXDEST/wxmotif
164 mkdir $WXDEST/wxmotif
/release
170 cd $WXDEST/wxmotif
/release
172 $WXSRC/configure
--with-motif --no-recursion
174 make -j1 dist bzip
-dist-only
176 if [ "$NORPMS" != "1" ]
179 echo Setting up RPM build dir
$RPM_ROOT...
182 mkdir $RPM_ROOT/BUILD
184 mkdir $RPM_ROOT/RPMS
/i386
185 mkdir $RPM_ROOT/RPMS
/i686
186 mkdir $RPM_ROOT/RPMS
/noarch
187 mkdir $RPM_ROOT/SOURCES
188 mkdir $RPM_ROOT/SPECS
189 mkdir $RPM_ROOT/SRPMS
191 echo %_topdir
$RPM_ROOT > ~
/.rpmmacros
193 echo Copying wxMOTIF
-$WXVER.
tar.bz2 to
$RPM_ROOT/SOURCES...
194 cp wxMOTIF
-$WXVER.
tar.bz2
$RPM_ROOT/SOURCES
195 echo Copying wxMotif.spec to
$RPM_ROOT/SPECS...
196 cp $WXSRC/wxMotif.spec
$RPM_ROOT/SPECS
198 echo Starting wxMotif RPM build...
200 rpmbuild
-ba SPECS
/wxMotif.spec
2>&1 | tee wxGTK.out
202 echo Finished wxMotif RPM build
, in $RPM_ROOT.
208 cp $RPM_ROOT/SRPMS
/*.rpm
$WXDEST
209 cp $RPM_ROOT/RPMS
/i
386/*.rpm
$WXDEST
213 cp $WXDEST/wxmotif
/release
/*.
tar.gz
$WXDEST
214 cp $WXDEST/wxmotif
/release
/*.
tar.bz2
$WXDEST
216 echo Rearchiving wxMotif tarballs to change wxMOTIF to wxMotif...
221 tar xfz ..
/wxMOTIF
-$WXVER.
tar.gz
222 mv wxMOTIF
-$WXVER wxMotif
-$WXVER
223 rm -f ..
/wxMOTIF
-$WXVER.
tar.gz
224 rm -f ..
/wxMOTIF
-$WXVER.
tar.bz2
225 tar cf ..
/wxMotif
-$WXVER.
tar *
226 gzip -c ..
/wxMotif
-$WXVER.
tar > ..
/wxMotif
-$WXVER.
tar.gz
227 bzip2 -f9 ..
/wxMotif
-$WXVER.
tar
230 # rm -f -r $WXDEST/wxmotif
232 echo Now try the RPMs with rpm
-i.
237 echo Making wxMac tarballs...
238 echo Note that this must be
done on a Mac.
239 if [ ! -d $WXDEST ]; then
243 rm -f -r $WXDEST/wxmac
245 mkdir $WXDEST/wxmac
/release
250 cd $WXDEST/wxmac
/release
252 $WXSRC/configure
--with-mac --no-recursion
254 make -j1 dist bzip
-dist-only
256 cp $WXDEST/wxmac
/release
/*.
tar.gz
$WXDEST
257 cp $WXDEST/wxmac
/release
/*.
tar.bz2
$WXDEST
259 echo Rearchiving wxMac tarballs to change wxMAC to wxMAC...
264 tar xfz ..
/wxMac
-$WXVER.
tar.gz
265 mv wxMAC
-$WXVER wxMac
-$WXVER
266 rm -f ..
/wxMAC
-$WXVER.
tar.gz
267 rm -f ..
/wxMAC
-$WXVER.
tar.bz2
268 tar cf ..
/wxMac
-$WXVER.
tar *
269 gzip -c ..
/wxMac
-$WXVER.
tar > ..
/wxMac
-$WXVER.
tar.gz
270 bzip2 -f9 ..
/wxMac
-$WXVER.
tar
274 rm -f -r $WXDEST/wxmac
275 echo Now try the RPMs with rpm
-i.
280 echo Making wxBase RPMs...
281 RPM_ROOT
=$WXDEST/wxbase
/rpm
-root
283 if [ ! -d $WXDEST ]; then
287 rm -f -r $WXDEST/wxbase
289 mkdir $WXDEST/wxbase
/release
295 cd $WXDEST/wxbase
/release
297 $WXSRC/configure
--disable-gui --no-recursion
299 make -j1 dist bzip
-dist-only
301 mkdir $WXDEST/$PLATFORM
303 if [ "$NORPMS" != "1" ]
306 echo Setting up RPM build dir
$RPM_ROOT...
309 mkdir $RPM_ROOT/BUILD
311 mkdir $RPM_ROOT/RPMS
/i386
312 mkdir $RPM_ROOT/RPMS
/i686
313 mkdir $RPM_ROOT/RPMS
/noarch
314 mkdir $RPM_ROOT/SOURCES
315 mkdir $RPM_ROOT/SPECS
316 mkdir $RPM_ROOT/SRPMS
318 echo %_topdir
$RPM_ROOT > ~
/.rpmmacros
320 echo Copying wxBase
-$WXVER.
tar.bz2 to
$RPM_ROOT/SOURCES...
321 cp wxBase
-$WXVER.
tar.bz2
$RPM_ROOT/SOURCES
322 echo Copying wxBase.spec to
$RPM_ROOT/SPECS...
323 cp $WXSRC/wxBase.spec
$RPM_ROOT/SPECS
325 echo Starting wxBase RPM build
, rpmbuild args
=$RPMBUILDARGS...
327 rpmbuild
-ba $RPMBUILDARGS SPECS
/wxBase.spec
2>&1 | tee wxBase.out
329 echo Finished wxBase RPM build
, in $RPM_ROOT.
335 cp $RPM_ROOT/SRPMS
/*.rpm
$WXDEST/$PLATFORM
336 cp $RPM_ROOT/RPMS
/i
386/*.rpm
$WXDEST/$PLATFORM
340 cp $WXDEST/wxbase
/release
/*.
tar.gz
$WXDEST/$PLATFORM
341 cp $WXDEST/wxbase
/release
/*.
tar.bz2
$WXDEST/$PLATFORM
343 # rm -f -r $WXDEST/wxbase
344 echo Now try the RPMs with rpm
-i.
349 echo Making wxX11 RPMs...
350 RPM_ROOT
=$WXDEST/wxx
11/rpm
-root
352 if [ ! -d $WXDEST ]; then
356 rm -f -r $WXDEST/wxx11
358 mkdir $WXDEST/wxx
11/release
364 cd $WXDEST/wxx
11/release
366 $WXSRC/configure
--with-x11 --no-recursion
368 make -j1 dist bzip
-dist-only
370 if [ "$NORPMS" != "1" ]
373 echo Setting up RPM build dir
$RPM_ROOT...
376 mkdir $RPM_ROOT/BUILD
378 mkdir $RPM_ROOT/RPMS
/i386
379 mkdir $RPM_ROOT/RPMS
/i686
380 mkdir $RPM_ROOT/RPMS
/noarch
381 mkdir $RPM_ROOT/SOURCES
382 mkdir $RPM_ROOT/SPECS
383 mkdir $RPM_ROOT/SRPMS
385 echo %_topdir
$RPM_ROOT > ~
/.rpmmacros
387 echo Copying wxX11
-$WXVER.
tar.bz2 to
$RPM_ROOT/SOURCES...
388 cp wxX11
-$WXVER.
tar.bz2
$RPM_ROOT/SOURCES
389 echo Copying wxX11.spec to
$RPM_ROOT/SPECS...
390 cp $WXSRC/wxX11.spec
$RPM_ROOT/SPECS
392 echo Starting wxX11 RPM build...
394 rpmbuild
-ba SPECS
/wxX11.spec
2>&1 | tee wxX11.out
396 echo Finished wxX11 RPM build
, in $RPM_ROOT.
402 cp $RPM_ROOT/SRPMS
/*.rpm
$WXDEST
403 cp $RPM_ROOT/RPMS
/i
386/*.rpm
$WXDEST
407 cp $WXDEST/wxx
11/release
/*.
tar.gz
$WXDEST
408 cp $WXDEST/wxx
11/release
/*.
tar.bz2
$WXDEST
410 # rm -f -r $WXDEST/wxx11
411 echo Now try the RPMs with rpm
-i.
433 echo Usage
: $PROGNAME "src-dir dest-dir version-number [ options ]"
435 echo " --help Display this help message"
436 echo " --wxgtk1 Spin wxGTK1 RPMs"
437 echo " --wxgtk2 Spin wxGTK2 RPMs"
438 echo " --wxgtk2unicode Spin wxGTK2 Unicode RPMs"
439 echo " --wxbase Spin wxBase RPMs"
440 echo " --wxbaseunicode Spin wxBase Unicode RPMs"
441 echo " --wxx11 Spin wxX11 RPMs"
442 echo " --wxmotif Spin wxMotif RPMs"
443 echo " --wxmgl Spin wxMGL RPMs"
444 echo " --wxmac Make wxMac tarball"
445 echo " --all Spin EVERYTHING"
446 echo " --updatecvs Update from CVS"
447 echo " --norpms No RPMS, just tarballs"
471 # Process command line options.
475 --wxx11) SPINWXX11
=1 ;;
476 --wxgtk1) SPINWXGTK1
=1 ;;
477 --wxgtk2) SPINWXGTK2
=1 ;;
478 --wxgtk2unicode) SPINWXGTK2UNICODE
=1 ;;
479 --wxmotif) SPINWXMOTIF
=1 ;;
480 --wxmgl) SPINWXMGL
=1 ;;
481 --wxmac) SPINWXMAC
=1 ;;
482 --wxbase) SPINWXBASE
=1 ;;
483 --wxbaseunicode) SPINWXBASEUNICODE
=1 ;;
484 --all) SPINEVERYTHING
=1 ;;
485 --updatecvs) UPDATECVS
=1 ;;
486 --norpms) NORPMS
=1 ;;
494 echo About to
make wxWidgets RPMs
:
498 echo CTRL
-C if this is not correct.
501 if [ "$UPDATECVS" = "1" ]; then
505 if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
509 if [ "$SPINWXGTK1" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
510 RPMBUILDARGS
="--without gtk2"
515 if [ "$SPINWXGTK2" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
516 RPMBUILDARGS
="--with gtk2"
521 if [ "$SPINWXGTK2UNICODE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
522 RPMBUILDARGS
="--with gtk2 --with unicode"
527 if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
532 if [ "$SPINWXBASEUNICODE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
533 RPMBUILDARGS
="--with unicode"
538 if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
542 if [ "$SPINWXMGL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
546 if [ "$SPINWXMAC" = "1" ]; then