#!/bin/sh # Makes the wxWindows RPMs doupdatecvs() { cd $WXSRC echo Updating from CVS... cvswx update -d -P } dospinwxgtk() { echo Making wxGTK RPMs... RPM_ROOT=$WXDEST/wxgtk/rpm-root if [ ! -d $WXDEST ]; then mkdir $WXDEST fi rm -f -r $WXDEST/wxgtk mkdir $WXDEST/wxgtk mkdir $WXDEST/wxgtk/release mkdir $RPM_ROOT cd $WXSRC cd locale make allmo cd $WXDEST/wxgtk/release echo Configuring... $WXSRC/configure --no-recursion echo Making... make -j1 dist bzip-dist-only 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 wxGTK-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES... cp wxGTK-$WXVER.tar.bz2 $RPM_ROOT/SOURCES echo Copying wxGTK.spec to $RPM_ROOT/SPECS... cp $WXSRC/wxGTK.spec $RPM_ROOT/SPECS echo Starting wxGTK RPM build... cd $RPM_ROOT rpmbuild -ba SPECS/wxGTK.spec 2>&1 | tee wxGTK.out echo Finished wxBase RPM build, in $RPM_ROOT. echo "SRPMS:" ls SRPMS echo "RPMS/i386:" ls RPMS/i386 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST cp $RPM_ROOT/RPMS/*.rpm $WXDEST cp $WXDEST/wxgtk/release/*.tar.gz $WXDEST cp $WXDEST/wxgtk/release/*.tar.bz2 $WXDEST echo Now try the RPMs with rpm -i. } dospinwxbase() { echo Making wxBase RPMs... RPM_ROOT=$WXDEST/wxbase/rpm-root if [ ! -d $WXDEST ]; then mkdir $WXDEST fi rm -f -r $WXDEST/wxbase mkdir $WXDEST/wxbase mkdir $WXDEST/wxbase/release mkdir $RPM_ROOT cd $WXSRC cd locale make allmo cd $WXDEST/wxbase/release echo Configuring... $WXSRC/configure --disable-gui --no-recursion echo Making... make -j1 dist bzip-dist-only 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 wxBase-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES... cp wxBase-$WXVER.tar.bz2 $RPM_ROOT/SOURCES echo Copying wxBase.spec to $RPM_ROOT/SPECS... cp $WXSRC/wxBase.spec $RPM_ROOT/SPECS echo Starting wxBase RPM build... cd $RPM_ROOT rpmbuild -ba SPECS/wxBase.spec 2>&1 | tee wxBase.out echo Finished wxBase RPM build, in $RPM_ROOT. echo "SRPMS:" ls SRPMS echo "RPMS/i386:" ls RPMS/i386 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST cp $RPM_ROOT/RPMS/*.rpm $WXDEST cp $WXDEST/wxbase/release/*.tar.gz $WXDEST cp $WXDEST/wxbase/release/*.tar.bz2 $WXDEST echo Now try the RPMs with rpm -i. } dospinwxx11() { echo Making wxX11 RPMs... RPM_ROOT=$WXDEST/wxx11/rpm-root if [ ! -d $WXDEST ]; then mkdir $WXDEST fi rm -f -r $WXDEST/wxx11 mkdir $WXDEST/wxx11 mkdir $WXDEST/wxx11/release mkdir $RPM_ROOT cd $WXSRC cd locale make allmo cd $WXDEST/wxx11/release echo Configuring... $WXSRC/configure --with-x11 --no-recursion echo Making... make -j1 dist bzip-dist-only 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 wxX11-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES... cp wxX11-$WXVER.tar.bz2 $RPM_ROOT/SOURCES echo Copying wxX11.spec to $RPM_ROOT/SPECS... cp $WXSRC/wxX11.spec $RPM_ROOT/SPECS echo Starting wxX11 RPM build... cd $RPM_ROOT rpmbuild -ba SPECS/wxX11.spec 2>&1 | tee wxX11.out echo Finished wxX11 RPM build, in $RPM_ROOT. echo "SRPMS:" ls SRPMS echo "RPMS/i386:" ls RPMS/i386 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST cp $RPM_ROOT/RPMS/*.rpm $WXDEST cp $WXDEST/wxx11/release/*.tar.gz $WXDEST cp $WXDEST/wxx11/release/*.tar.bz2 $WXDEST echo Now try the RPMs with rpm -i. } PROGNAME=$0 WXSRC=$1 WXDEST=$2 WXVER=$3 SPINWXX11=0 SPINWXGTK=0 SPINWXBASE=0 SPINEVERYTHING=0 UPDATECVS=0 usage() { echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]" echo Options: echo " --help Display this help message" echo " --wxgtk Spin wxGTK RPMs" echo " --wxbase Spin wxBase RPMs" echo " --wxx11 Spin wxX11 RPMs" echo " --all Spin EVERYTHING" echo " --updatecvs Update from CVS" exit 1 } init="" if [ "$1" = "" ] then usage exit fi if [ "$2" = "" ] then usage exit fi if [ "$3" = "" ] then usage exit fi # Process command line options. shift 3 for i in "$@"; do case "$i" in --wxx11) SPINWXX11=1 ;; --wxgtk) SPINWXGTK=1 ;; --wxbase) SPINWXBASE=1 ;; --all) SPINEVERYTHING=1 ;; --updatecvs) UPDATECVS=1 ;; *) usage exit ;; esac done echo About to make wxWindows RPMs: echo From $WXSRC echo To $WXDEST echo Version $WXVER echo CTRL-C if this is not correct. read dummy if [ "$UPDATECVS" = "1" ]; then doupdatecvs fi if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then dospinwxx11 fi if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then dospinwxgtk fi if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then dospinwxbase fi