summaryrefslogtreecommitdiffstats
path: root/network/anydesk
diff options
context:
space:
mode:
Diffstat (limited to 'network/anydesk')
-rw-r--r--network/anydesk/anydesk.SlackBuild43
-rw-r--r--network/anydesk/anydesk.info6
-rw-r--r--network/anydesk/doinst.sh26
3 files changed, 52 insertions, 23 deletions
diff --git a/network/anydesk/anydesk.SlackBuild b/network/anydesk/anydesk.SlackBuild
index aac6be4bfd..121bae5b0d 100644
--- a/network/anydesk/anydesk.SlackBuild
+++ b/network/anydesk/anydesk.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Slackware build script for anydesk
#
@@ -22,42 +22,45 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=anydesk
-VERSION=${VERSION:-6.0.1}
+VERSION=${VERSION:-6.3.0}
BUILD=${BUILD:-1}
+RPMBUILD=${RPMBUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
+ ARCH=$( uname -m )
+fi
+
+if [ "$ARCH" != "x86_64" ]; then
+ echo "Package for $ARCH architecture is not available."
+ exit 1
+fi
+
+# 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
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
-if [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
- BITS="amd64"
-else
- echo "Package for $(uname -m) architecture is not available."
- exit 1
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-${VERSION}
mkdir $PRGNAM-${VERSION}
cd $PRGNAM-${VERSION}
-rpm2cpio $CWD/${PRGNAM}_${VERSION}-${BUILD}_${ARCH}.rpm | cpio -idmv
+rpm2cpio $CWD/${PRGNAM}_${VERSION}-${RPMBUILD}_${ARCH}.rpm | cpio -idmv
cp -r * $PKG
cd $PKG
rm -rf usr/share/anydesk
@@ -71,7 +74,7 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
mkdir -p $PKG/etc/rc.d/
-cp $CWD/rc.anydesk $PKG/etc/rc.d/rc.anydesk
+cat $CWD/rc.anydesk > $PKG/etc/rc.d/rc.anydesk.new
cd $PKG
-/sbin/makepkg -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/network/anydesk/anydesk.info b/network/anydesk/anydesk.info
index 1ab5b2b2fb..11fb824470 100644
--- a/network/anydesk/anydesk.info
+++ b/network/anydesk/anydesk.info
@@ -1,10 +1,10 @@
PRGNAM="anydesk"
-VERSION="6.0.1"
+VERSION="6.3.0"
HOMEPAGE="https://anydesk.com/"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
-DOWNLOAD_x86_64="https://download.anydesk.com/linux/anydesk_6.0.1-1_x86_64.rpm"
-MD5SUM_x86_64="5660c68e7dd31ce95dc74e02e74f776d"
+DOWNLOAD_x86_64="https://download.anydesk.com/linux/anydesk_6.3.0-1_x86_64.rpm"
+MD5SUM_x86_64="2c3d1e7d55c46332ad8a20105f6929f3"
REQUIRES="gtkglext lsb-release"
MAINTAINER="Reza Talebi"
EMAIL="reza.talebi.73@outlook.com"
diff --git a/network/anydesk/doinst.sh b/network/anydesk/doinst.sh
index aea0f894eb..4a1462ff3a 100644
--- a/network/anydesk/doinst.sh
+++ b/network/anydesk/doinst.sh
@@ -1,3 +1,27 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
@@ -11,3 +35,5 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi
+
+preserve_perms etc/rc.d/rc.anydesk.new