network/teamviewer: Support alternate tarball name.

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
David Spencer 2016-02-28 00:13:31 +00:00 committed by Willy Sudiarto Raharjo
parent 7bf9b20157
commit 4b478f0fc9
1 changed files with 15 additions and 11 deletions

View File

@ -45,13 +45,13 @@ OUTPUT=${OUTPUT:-/tmp}
# Sanity check, we make sure resulting package will work on users system.
case "$ARCH" in
i?86)
:
;;
x86_64)
echo "$ARCH is not supported, you will need 32bit compatibility libs..."
ARCH=i486
;;
i486)
echo "System check passed..."
;;
*)
echo "$ARCH is not supported."
exit 1
@ -63,17 +63,21 @@ LIBDIRSUFFIX=""
set -eu
# Get the real version
REAL_VER=$(ar p teamviewer_${DEBARCH}.deb control.tar.gz | tar xzO ./control | grep Version | cut -d\ -f2 | cut -d- -f1)
if [ "$VERSION" != "$REAL_VER" ]; then
echo "Version of downloaded source [$REAL_VER] does not match version of SlackBuild [$VERSION]"
exit 1
fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $PKG
ar p $CWD/teamviewer_${DEBARCH}.deb data.tar.bz2 | tar xjv
if [ -f $CWD/teamviewer_${DEBARCH}.deb ]; then
# Get the real version
REAL_VER=$(ar p $CWD/teamviewer_${DEBARCH}.deb control.tar.gz | tar xzO ./control | grep Version | cut -d\ -f2 | cut -d- -f1)
if [ "$VERSION" != "$REAL_VER" ]; then
echo "Version of downloaded source [$REAL_VER] does not match version of SlackBuild [$VERSION]"
exit 1
fi
ar p $CWD/teamviewer_${DEBARCH}.deb data.tar.bz2 | tar xjv
else
ar p $CWD/teamviewer_${VERSION}_${DEBARCH}.deb data.tar.bz2 | tar xjv
fi
chown -R root:root .
find -L . \