+ cp $RPM_ROOT/SRPMS/*.rpm $WXDEST/$PLATFORM
+ cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST/$PLATFORM
+
+ fi
+
+ cp $WXDEST/wxgtk/release/*.tar.gz $WXDEST/$PLATFORM
+ cp $WXDEST/wxgtk/release/*.tar.bz2 $WXDEST/$PLATFORM
+
+# rm -f -r $WXDEST/wxgtk
+
+ echo Now try the RPMs with rpm -i.
+}
+
+dospinwxmgl()
+{
+ echo Making wxMGL RPMs...
+ RPM_ROOT=$WXDEST/wxmgl/rpm-root
+
+ if [ ! -d $WXDEST ]; then
+ mkdir $WXDEST
+ fi
+
+ rm -f -r $WXDEST/wxmgl
+ mkdir $WXDEST/wxmgl
+ mkdir $WXDEST/wxmgl/release
+ mkdir $RPM_ROOT
+
+ cd $WXSRC
+ cd locale
+ make allmo
+ cd $WXDEST/wxmgl/release
+ echo Configuring...
+ $WXSRC/configure --with-mgl --no-recursion
+ echo Making...
+ make -j1 dist bzip-dist-only
+
+ if [ "$NORPMS" != "1" ]
+ then
+
+ echo Setting up RPM build dir $RPM_ROOT...
+ rm -f -r $RPM_ROOT
+ mkdir $RPM_ROOT
+ mkdir $RPM_ROOT/BUILD
+ mkdir $RPM_ROOT/RPMS
+ mkdir $RPM_ROOT/RPMS/i386
+ mkdir $RPM_ROOT/RPMS/i686
+ mkdir $RPM_ROOT/RPMS/noarch
+ mkdir $RPM_ROOT/SOURCES
+ mkdir $RPM_ROOT/SPECS
+ mkdir $RPM_ROOT/SRPMS
+
+ echo %_topdir $RPM_ROOT > ~/.rpmmacros
+
+ echo Copying wxMGL-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
+ cp wxMGL-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
+ echo Copying wxMGL.spec to $RPM_ROOT/SPECS...
+ cp $WXSRC/wxMGL.spec $RPM_ROOT/SPECS
+
+ echo Starting wxMGL RPM build...
+ cd $RPM_ROOT
+ rpmbuild -ba SPECS/wxMGL.spec 2>&1 | tee wxMGL.out
+
+ echo Finished wxMGL RPM build, in $RPM_ROOT.
+ echo "SRPMS:"
+ ls SRPMS
+ echo "RPMS/i386:"
+ ls RPMS/i386
+