aboutsummaryrefslogtreecommitdiff
path: root/system/kbfs/kbfs.SlackBuild
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-01-27 16:39:36 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-01-28 01:29:40 +0700
commitd4b67489ee415579416e00a98978d5e536a3d7a4 (patch)
tree554f9794927bfb3a9022e8d9d114dcdaf83cd40c /system/kbfs/kbfs.SlackBuild
parenta57871ce6b8a31822c082d76fe21d4d06c0b0906 (diff)
system/kbfs: Updated for version 1.0.40_20180127033950.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/kbfs/kbfs.SlackBuild')
-rw-r--r--system/kbfs/kbfs.SlackBuild35
1 files changed, 32 insertions, 3 deletions
diff --git a/system/kbfs/kbfs.SlackBuild b/system/kbfs/kbfs.SlackBuild
index 15fde05422c53..14e28b702a12e 100644
--- a/system/kbfs/kbfs.SlackBuild
+++ b/system/kbfs/kbfs.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for kbfs
-# Copyright 2017 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
+# Copyright 2017-2018 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,12 +24,17 @@
PRGNAM=kbfs
SRCNAM=keybase
-VERSION=${VERSION:-1.0.38_20171221170044}
-COMMITVER=4c1f9803e
+VERSION=${VERSION:-1.0.40_20180127033950}
+COMMITVER=76a4b90c9
SRCVER=$(echo $VERSION | tr _ - )
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+KBFS_USER=${KBFS_USER:-keybasehelper}
+KBFS_UID=${KBFS_UID:-352}
+KBFS_GROUP=${KBFS_GROUP:-keybasehelper}
+KBFS_GID=${KBFS_GID:-352}
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -38,6 +43,20 @@ if [ -z "$ARCH" ]; then
esac
fi
+bailout() {
+ echo " You must have a $KBFS_USER user and $KBFS_GROUP group to run this script. "
+ echo " # groupadd -g $KBFS_GID $KBFS_GROUP "
+ echo " # useradd -u $KBFS_UID -g $KBFS_GID -c \"keybase helper user\" -s /bin/false $KBFS_USER "
+ exit 1
+}
+
+# Bail if user and/or group isn't valid on your system
+if ! grep -q "^$KBFS_USER:" /etc/passwd; then
+ bailout
+elif ! grep -q "^$KBFS_GROUP:" /etc/group; then
+ bailout
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -63,6 +82,7 @@ fi
set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $PKG
@@ -81,6 +101,15 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# This is used only by Ubuntu/Debian derivatives
rm -rf $PKG/etc/cron.daily/
+mkdir -p $PKG/var/lib/keybase/
+chown $KBFS_USER:$KBFS_GROUP $PKG/usr/bin/keybase-mount-helper
+chmod 4755 $PKG/usr/bin/keybase-mount-helper
+(
+ ln -s /opt/keybase/mount-readme $PKG/var/lib/keybase/mount1
+ chown $KBFS_USER:$KBFS_GROUP $PKG/var/lib/keybase
+ ln -s /var/lib/keybase/mount1 $PKG/keybase
+)
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh