aboutsummaryrefslogtreecommitdiff
path: root/system/motion/motion.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/motion/motion.SlackBuild')
-rw-r--r--system/motion/motion.SlackBuild36
1 files changed, 23 insertions, 13 deletions
diff --git a/system/motion/motion.SlackBuild b/system/motion/motion.SlackBuild
index 38105e5dce50..9a9f2bb6f46d 100644
--- a/system/motion/motion.SlackBuild
+++ b/system/motion/motion.SlackBuild
@@ -25,7 +25,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=motion
-VERSION=${VERSION:-20120717_0fb31d6}
+VERSION=${VERSION:-4.0.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -50,21 +50,30 @@ elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi
+# Check ffmpeg existence
+ff=`pkg-config --exists libavfilter`
+if [ $? -eq 0 ]; then
+ ffmpeg=""
+else
+ ffmpeg="--without-ffmpeg"
+fi
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-release-$VERSION
+tar xvf $CWD/$PRGNAM-release-$VERSION.tar.gz
+cd $PRGNAM-release-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+autoreconf
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -73,7 +82,8 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--localstatedir=/var \
--build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux
+ --host=$ARCH-slackware-linux \
+ $ffmpeg
make
make install DESTDIR=$PKG
@@ -85,11 +95,11 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
# Let's not clobber the config file
-mv $PKG/etc/motion-dist.conf $PKG/etc/motion-dist.conf.new
+mv $PKG/etc/motion/motion-dist.conf $PKG/etc/motion/motion-dist.conf.new
-mkdir $PKG/usr/doc
-mv $PKG/usr/share/doc/motion-* $PKG/usr/doc/$PRGNAM-$VERSION
-mv $PKG/usr/share/$PRGNAM-*/examples $PKG/usr/doc/$PRGNAM-$VERSION/
+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/
rm -rf $PKG/usr/share # We moved the docs from there
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild