From df27dd71d0c6f8e53d278b7a2bc8efd041c6828d Mon Sep 17 00:00:00 2001 From: Mario Preksavec Date: Thu, 25 Feb 2016 23:21:44 +0700 Subject: [PATCH] network/teamviewer: script cleanup. Signed-off-by: Willy Sudiarto Raharjo --- network/teamviewer/teamviewer.SlackBuild | 33 ++++++++++++++---------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/network/teamviewer/teamviewer.SlackBuild b/network/teamviewer/teamviewer.SlackBuild index 2aedab9446..821a1d3eaa 100644 --- a/network/teamviewer/teamviewer.SlackBuild +++ b/network/teamviewer/teamviewer.SlackBuild @@ -23,6 +23,8 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Modified by Mario Preksavec + PRGNAM=teamviewer VERSION=${VERSION:-11.0.53191} BUILD=${BUILD:-2} @@ -41,13 +43,23 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - DEBARCH="i386" - LIBDIRSUFFIX="" -else - echo "Package for $(uname -m) architecture is not available." - exit 1 -fi +# Sanity check, we make sure resulting package will work on users system. +case "$ARCH" in + 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 + ;; +esac + +DEBARCH="i386" +LIBDIRSUFFIX="" set -eu @@ -99,13 +111,6 @@ 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 -# Let's flip-flop the actual locations vs. symlinks of a couple of things: -# First remove the dangling symlink made by Debian packages: -rm -rf $PKG/var/log/teamviewer* $PKG/etc/teamviewer -mkdir -p $PKG/var/log/teamviewer11 $PKG/etc/teamviewer -rm -rf $PKG/opt/teamviewer/logfiles/ $PKG/opt/teamviewer/config/ -ln -s /etc/teamviewer $PKG/opt/teamviewer/config - mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh