summaryrefslogtreecommitdiffstats
path: root/system/motion/motion.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/motion/motion.SlackBuild')
-rw-r--r--system/motion/motion.SlackBuild26
1 files changed, 19 insertions, 7 deletions
diff --git a/system/motion/motion.SlackBuild b/system/motion/motion.SlackBuild
index d0e0493159..09cea9dc89 100644
--- a/system/motion/motion.SlackBuild
+++ b/system/motion/motion.SlackBuild
@@ -1,10 +1,11 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for motion.
#
-# Copyright 2013 Sebastian Arcus: sbo {at} open-t {dot} co {dot} uk
+# Copyright 2013-2020 Sebastian Arcus: s.arcus {at} open-t [dot] co [dot] uk
# Copyright 2009-2010 Pierre Cazenave <pwcazenave> {at} gmail [dot] com
# Copyright 2007 Martin Lefebvre <dadexter@sekurity.com>
+# With contributions from JB: afrotrap {at} gmail [dot] com
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,10 +25,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=motion
-VERSION=${VERSION:-4.2.2}
+VERSION=${VERSION:-4.6.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +41,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}
@@ -73,7 +84,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-autoreconf
+autoreconf -fiv
+LIBS="-lwebp" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -99,7 +111,7 @@ mv $PKG/etc/motion/motion-dist.conf $PKG/etc/motion/motion-dist.conf.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/share/doc/motion/* $PKG/usr/doc/$PRGNAM-$VERSION
-mv $PKG/usr/share/$PRGNAM/examples $PKG/usr/doc/$PRGNAM-$VERSION/
+#mv $PKG/usr/share/$PRGNAM/examples $PKG/usr/doc/$PRGNAM-$VERSION/
rm -rf $PKG/usr/share # We moved the docs from there
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -108,4 +120,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