summaryrefslogtreecommitdiffstats
path: root/network/teamviewer/teamviewer.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/teamviewer/teamviewer.SlackBuild')
-rw-r--r--network/teamviewer/teamviewer.SlackBuild52
1 files changed, 32 insertions, 20 deletions
diff --git a/network/teamviewer/teamviewer.SlackBuild b/network/teamviewer/teamviewer.SlackBuild
index 39e04fe074..b1819a9c35 100644
--- a/network/teamviewer/teamviewer.SlackBuild
+++ b/network/teamviewer/teamviewer.SlackBuild
@@ -1,9 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for teamviewer
# Copyright 2010-2012 Binh Nguyen <binhvng@gmail.com>
# Copyright 2013-2018 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
+# Copyright 2022-2024 Gregory J. L. Tourte <artourter@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,10 +26,13 @@
# Modified by Mario Preksavec <mario@slackware.hr>
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=teamviewer
-VERSION=${VERSION:-15.14.5}
+VERSION=${VERSION:-15.52.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,7 +42,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -75,25 +86,30 @@ else
ar p $CWD/teamviewer_${VERSION}_${DEBARCH}.deb data.tar.xz | tar xJv
fi
+# make all symbolic links relative
+# (code from https://unix.stackexchange.com/a/100955/16829)
+( cd $PKG
+for link in $(find . -lname '/*'); do
+ target=$(readlink "$link")
+ link=${link#./}
+ root=$(echo $link | sed -E 's|[^/](.[^/]*)|..|g'); root=${root#/}; root=${root%..}
+ rm "$link"
+ ln -s "$root${target#/}" "$link"
+done
+)
+
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+# we do not strip te libicudata library as it prevents the package from working.
+find $PKG -print0 | xargs -0 file | grep -v -e 'libicudata' | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-# Remove the dangling symlink first
-rm -f $PKG/usr/bin/teamviewer
-
-# Re-create the generic executable
-( cd $PKG/usr/bin; ln -s /opt/teamviewer/tv_bin/script/teamviewer teamviewer )
-
# Link icon to /usr/share/pixmaps
mkdir -p $PKG/usr/share/pixmaps
-( ln -sf /opt/teamviewer/tv_bin/desktop/teamviewer_256.png $PKG/usr/share/pixmaps/TeamViewer.png )
+ln -s ../../../opt/teamviewer/tv_bin/desktop/teamviewer_256.png $PKG/usr/share/pixmaps/TeamViewer.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -103,10 +119,6 @@ mv $PKG/usr/share/applications/com.teamviewer.TeamViewer.desktop $PKG/usr/share/
# We don't need apt
rm -rf $PKG/etc/apt/
-# Move docs to official place
-mv $PKG/opt/teamviewer/doc/*.txt $PKG/usr/doc/$PRGNAM-$VERSION
-rm -rf $PKG/opt/teamviewer/doc/
-
mkdir -p $PKG/etc/rc.d/
install -m 0644 $CWD/rc.teamviewerd $PKG/etc/rc.d/rc.teamviewerd.new
@@ -115,4 +127,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE