]> git.saurik.com Git - wxWidgets.git/blobdiff - distrib/msw/makerpm
wxUniv compilation fix for gs_windowHandles assignment
[wxWidgets.git] / distrib / msw / makerpm
index c2774355834ec261ed8d52bf7797276f6623530b..6e8438e41f0426f070d7b3280178a312ef09cea8 100755 (executable)
@@ -1,5 +1,9 @@
 #!/bin/sh
-# Makes the wxWindows RPMs
+# Makes the wxWidgets RPMs
+
+RPMBUILDARGS=
+PLATFORM=
+NORPMS=
 
 doupdatecvs()
 {
@@ -31,6 +35,11 @@ dospinwxgtk()
   echo Making...
   make -j1 dist bzip-dist-only
 
+  mkdir $WXDEST/$PLATFORM
+
+  if [ "$NORPMS" != "1" ]
+  then
+
   echo Setting up RPM build dir $RPM_ROOT...
   rm -f -r $RPM_ROOT
   mkdir $RPM_ROOT
@@ -50,9 +59,9 @@ dospinwxgtk()
   echo Copying wxGTK.spec to $RPM_ROOT/SPECS...
   cp $WXSRC/wxGTK.spec $RPM_ROOT/SPECS
 
-  echo Starting wxGTK RPM build...
+  echo Starting wxGTK RPM build, rpmbuild args=$RPMBUILDARGS...
   cd $RPM_ROOT
-  rpmbuild -ba SPECS/wxGTK.spec 2>&1 | tee wxGTK.out
+  rpmbuild -ba $RPMBUILDARGS SPECS/wxGTK.spec 2>&1 | tee wxGTK.out
 
   echo Finished wxGTK RPM build, in $RPM_ROOT.
   echo "SRPMS:"
@@ -60,12 +69,15 @@ dospinwxgtk()
   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
+  cp $RPM_ROOT/SRPMS/*.rpm $WXDEST/$PLATFORM
+  cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST/$PLATFORM
 
-  rm -f -r $WXDEST/wxgtk
+  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.
 }
@@ -93,6 +105,9 @@ dospinwxmgl()
   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
@@ -123,11 +138,14 @@ dospinwxmgl()
   ls RPMS/i386
 
   cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
-  cp $RPM_ROOT/RPMS/*.rpm $WXDEST
+  cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST
+
+  fi
+
   cp $WXDEST/wxmgl/release/*.tar.gz $WXDEST
   cp $WXDEST/wxmgl/release/*.tar.bz2 $WXDEST
 
-  rm -f -r $WXDEST/wxmgl
+#  rm -f -r $WXDEST/wxmgl
 
   echo Now try the RPMs with rpm -i.
 }
@@ -155,6 +173,9 @@ dospinwxmotif()
   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
@@ -185,7 +206,10 @@ dospinwxmotif()
   ls RPMS/i386
 
   cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
-  cp $RPM_ROOT/RPMS/*.rpm $WXDEST
+  cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST
+
+  fi
+
   cp $WXDEST/wxmotif/release/*.tar.gz $WXDEST
   cp $WXDEST/wxmotif/release/*.tar.bz2 $WXDEST
 
@@ -203,7 +227,7 @@ dospinwxmotif()
   bzip2 -f9 ../wxMotif-$WXVER.tar
   cd ..
   rm -f -r wxMotif.tmp
-  rm -f -r $WXDEST/wxmotif
+#  rm -f -r $WXDEST/wxmotif
 
   echo Now try the RPMs with rpm -i.
 }
@@ -274,6 +298,11 @@ dospinwxbase()
   echo Making...
   make -j1 dist bzip-dist-only
 
+  mkdir $WXDEST/$PLATFORM
+
+  if [ "$NORPMS" != "1" ]
+  then
+
   echo Setting up RPM build dir $RPM_ROOT...
   rm -f -r $RPM_ROOT
   mkdir $RPM_ROOT
@@ -293,9 +322,9 @@ dospinwxbase()
   echo Copying wxBase.spec to $RPM_ROOT/SPECS...
   cp $WXSRC/wxBase.spec $RPM_ROOT/SPECS
 
-  echo Starting wxBase RPM build...
+  echo Starting wxBase RPM build, rpmbuild args=$RPMBUILDARGS...
   cd $RPM_ROOT
-  rpmbuild -ba SPECS/wxBase.spec 2>&1 | tee wxBase.out
+  rpmbuild -ba $RPMBUILDARGS SPECS/wxBase.spec 2>&1 | tee wxBase.out
 
   echo Finished wxBase RPM build, in $RPM_ROOT.
   echo "SRPMS:"
@@ -303,12 +332,15 @@ dospinwxbase()
   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
+  cp $RPM_ROOT/SRPMS/*.rpm $WXDEST/$PLATFORM
+  cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST/$PLATFORM
 
-  rm -f -r $WXDEST/wxbase
+  fi
+
+  cp $WXDEST/wxbase/release/*.tar.gz $WXDEST/$PLATFORM
+  cp $WXDEST/wxbase/release/*.tar.bz2 $WXDEST/$PLATFORM
+
+#  rm -f -r $WXDEST/wxbase
   echo Now try the RPMs with rpm -i.
 }
 
@@ -335,6 +367,9 @@ dospinwxx11()
   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
@@ -365,11 +400,14 @@ dospinwxx11()
   ls RPMS/i386
 
   cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
-  cp $RPM_ROOT/RPMS/*.rpm $WXDEST
+  cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST
+
+  fi
+
   cp $WXDEST/wxx11/release/*.tar.gz $WXDEST
   cp $WXDEST/wxx11/release/*.tar.bz2 $WXDEST
 
-  rm -f -r $WXDEST/wxx11
+#  rm -f -r $WXDEST/wxx11
   echo Now try the RPMs with rpm -i.
 }
 
@@ -379,10 +417,13 @@ WXDEST=$2
 WXVER=$3
 
 SPINWXX11=0
-SPINWXGTK=0
+SPINWXGTK1=0
+SPINWXGTK2=0
+SPINWXGTK2UNICODE=0
 SPINWXMAC=0
 SPINWXMOTIF=0
 SPINWXBASE=0
+SPINWXBASEUNICODE=0
 SPINWXMGL=0
 SPINEVERYTHING=0
 UPDATECVS=0
@@ -391,15 +432,19 @@ 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 "    --wxmotif      Spin wxMotif RPMs"
-    echo "    --wxmgl        Spin wxMGL RPMs"
-    echo "    --wxmac        Make wxMac tarball"
-    echo "    --all          Spin EVERYTHING"
-    echo "    --updatecvs    Update from CVS"
+    echo "    --help          Display this help message"
+    echo "    --wxgtk1        Spin wxGTK1 RPMs"
+    echo "    --wxgtk2        Spin wxGTK2 RPMs"
+    echo "    --wxgtk2unicode Spin wxGTK2 Unicode RPMs"
+    echo "    --wxbase        Spin wxBase RPMs"
+    echo "    --wxbaseunicode Spin wxBase Unicode RPMs"
+    echo "    --wxx11         Spin wxX11 RPMs"
+    echo "    --wxmotif       Spin wxMotif RPMs"
+    echo "    --wxmgl         Spin wxMGL RPMs"
+    echo "    --wxmac         Make wxMac tarball"
+    echo "    --all           Spin EVERYTHING"
+    echo "    --updatecvs     Update from CVS"
+    echo "    --norpms        No RPMS, just tarballs"
 
     exit 1
 }
@@ -428,13 +473,17 @@ shift 3
 for i in "$@"; do
     case "$i" in
        --wxx11) SPINWXX11=1 ;;
-       --wxgtk) SPINWXGTK=1 ;;
+       --wxgtk1) SPINWXGTK1=1 ;;
+       --wxgtk2) SPINWXGTK2=1 ;;
+       --wxgtk2unicode) SPINWXGTK2UNICODE=1 ;;
        --wxmotif) SPINWXMOTIF=1 ;;
        --wxmgl) SPINWXMGL=1 ;;
        --wxmac) SPINWXMAC=1 ;;
        --wxbase) SPINWXBASE=1 ;;
+       --wxbaseunicode) SPINWXBASEUNICODE=1 ;;
        --all) SPINEVERYTHING=1 ;;
        --updatecvs) UPDATECVS=1 ;;
+       --norpms) NORPMS=1 ;;
        *)
            usage
            exit
@@ -442,7 +491,7 @@ for i in "$@"; do
     esac
 done
 
-echo About to make wxWindows RPMs:
+echo About to make wxWidgets RPMs:
 echo   From    $WXSRC
 echo   To      $WXDEST
 echo   Version $WXVER
@@ -457,11 +506,32 @@ if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
   dospinwxx11
 fi
 
-if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+if [ "$SPINWXGTK1" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+  RPMBUILDARGS="--without gtk2"
+  PLATFORM=gtk1
+  dospinwxgtk
+fi
+
+if [ "$SPINWXGTK2" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+  RPMBUILDARGS="--with gtk2"
+  PLATFORM=gtk2
+  dospinwxgtk
+fi
+
+if [ "$SPINWXGTK2UNICODE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+  RPMBUILDARGS="--with gtk2 --with unicode"
+  PLATFORM=gtk2unicode
   dospinwxgtk
 fi
 
 if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+  PLATFORM=base
+  dospinwxbase
+fi
+
+if [ "$SPINWXBASEUNICODE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+  RPMBUILDARGS="--with unicode"
+  PLATFORM=baseunicode
   dospinwxbase
 fi