summaryrefslogtreecommitdiffstats
path: root/network/syncthing/syncthing.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/syncthing/syncthing.SlackBuild')
-rw-r--r--network/syncthing/syncthing.SlackBuild24
1 files changed, 18 insertions, 6 deletions
diff --git a/network/syncthing/syncthing.SlackBuild b/network/syncthing/syncthing.SlackBuild
index 850ebef29c..c95bf6a272 100644
--- a/network/syncthing/syncthing.SlackBuild
+++ b/network/syncthing/syncthing.SlackBuild
@@ -1,5 +1,7 @@
-#!/bin/sh
+#!/bin/bash
+
# Slackware build script for syncthing
+
# Copyright 2015 Lionel Young, United States
# Copyright 2016 Sebastian Arcus, United Kingdom
# All rights reserved.
@@ -21,10 +23,13 @@
# 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=syncthing
-VERSION=${VERSION:-1.9.0}
+VERSION=${VERSION:-1.27.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -43,7 +48,14 @@ else
exit 1
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}
@@ -89,10 +101,10 @@ cat $CWD/syncthing.logrotate > $PKG/etc/logrotate.d/syncthing.new
mkdir -p -m 750 $PKG/var/lib/syncthing/config
mkdir -p -m 750 $PKG/var/log/syncthing
mkdir -p -m 750 $PKG/var/run/syncthing
-chown -R syncthing.syncthing $PKG/var/{lib,run,log}/syncthing
+chown -R syncthing:syncthing $PKG/var/{lib,run,log}/syncthing
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a *.txt extra/*.pdf $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -100,4 +112,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