Commits

Lee Pak Hong  committed 71d4cbe

Rebuild thunderbird

Signed-off-by: Lee Pak Hong <hata.ph@gmail.com>

  • Participants
  • Parent commits 6108696
  • Branches veclinux-7.0

Comments (0)

Files changed (1)

File var/vabs/thunderbird/src/thunderbird.SlackBuild

 
 NUMJOBS=${NUMJOBS:-" -j7 "}
 
+TARBALLVER=$(basename $(ls thunderbird-*.tar.bz2 | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)
+
+# Figure out if this is a beta, or a release:
+if echo $TARBALLVER | grep -q b ; then # we think it is a beta
+  if bzgrep -q comm-beta/ $CWD/thunderbird-$TARBALLVER.source.tar.bz2 ; then
+    MOZVERS=${MOZVERS:-beta}
+  else # blindly assume it is a release
+    MOZVERS=${MOZVERS:-release}
+  fi
+else # release, no "b" in the tarball version:
+  if bzgrep -q comm-esr${MAJORVER}/ $CWD/thunderbird-$TARBALLVER.source.tar.bz2 ; then
+    # Looks like we get this sometimes even when the tarball isn't labeled as esr...
+    MOZVERS=${MOZVERS:-esr${MAJORVER}}
+  else
+    MOZVERS=${MOZVERS:-release}
+  fi
+fi
+
 if [ $UID != 0 ]; then
    echo "You are not authorized to run this script. Please login as root"
    exit 1
 rm -rf $PKG
 mkdir -p $PKG
 cd $TMP $PKG/usr/lib${LIBDIRSUFFIX}
-rm -rf comm-release
+rm -rf comm-$MOZVERS
 
 
 #EXTRACT SOURCES
 echo "Extracting source..."
 tar xvf $CWD/$NAME-$VERSION.source.tar.* || exit 1
 #this moves whatever was extracted to the std dirname we are expecting
-mv * $NAME-$VERSION &> /dev/null 2>&1
+#mv * $NAME-$VERSION &> /dev/null 2>&1
 mkdir -p $PKG
 #-----------------------------------------------------
 
 
-cd $TMP/comm-release
+cd $TMP/comm-$MOZVERS
 
 # Put any Patches into a patches folder in the src dir
 #-----------------------------------------------------
-for i in $CWD/patches/*;do
+#for i in $CWD/patches/*;do
 #  patch -p1 <$i
-  mkdir -p $PKG/usr/doc/$NAME-$VERSION/patches/
-  cp $i $PKG/usr/doc/$NAME-$VERSION/patches/
-done
+#  mkdir -p $PKG/usr/doc/$NAME-$VERSION/patches/
+#  cp $i $PKG/usr/doc/$NAME-$VERSION/patches/
+#done
 #-----------------------------------------------------
 
 # Fix a long standing bug that's prevented staying current on GTK+.