summaryrefslogtreecommitdiff
path: root/system/motion
diff options
context:
space:
mode:
Diffstat (limited to 'system/motion')
-rw-r--r--system/motion/README2
-rw-r--r--system/motion/motion-3.2.11-offsett.patch13
-rw-r--r--system/motion/motion.SlackBuild29
-rw-r--r--system/motion/motion.info8
4 files changed, 38 insertions, 14 deletions
diff --git a/system/motion/README b/system/motion/README
index 7c55c24da9..d6877f7633 100644
--- a/system/motion/README
+++ b/system/motion/README
@@ -8,5 +8,5 @@ configuration files.
Optional dependencies are ffmpeg and postgresql.
-Once installed, please be sure to read /usr/doc/motion-3.2.9/README for
+Once installed, please be sure to read /usr/doc/motion-3.2.11/README for
any configuration help.
diff --git a/system/motion/motion-3.2.11-offsett.patch b/system/motion/motion-3.2.11-offsett.patch
new file mode 100644
index 0000000000..f3116abbc8
--- /dev/null
+++ b/system/motion/motion-3.2.11-offsett.patch
@@ -0,0 +1,13 @@
+Index: motion-3.2.11/ffmpeg.c
+===================================================================
+--- motion-3.2.11.orig/ffmpeg.c
++++ motion-3.2.11/ffmpeg.c
+@@ -164,7 +164,7 @@ static int file_write(URLContext *h, uns
+ return write(fd, buf, size);
+ }
+
+-static offset_t file_seek(URLContext *h, offset_t pos, int whence)
++static int64_t file_seek(URLContext *h, int64_t pos, int whence)
+ {
+ int fd = (size_t)h->priv_data;
+ return lseek(fd, pos, whence);
diff --git a/system/motion/motion.SlackBuild b/system/motion/motion.SlackBuild
index 7ce2f12f99..8b6849acc0 100644
--- a/system/motion/motion.SlackBuild
+++ b/system/motion/motion.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=motion
-VERSION=3.2.9
+VERSION=3.2.11
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -37,6 +37,8 @@ if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
set -e
@@ -45,11 +47,17 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -zxvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
-find . -type d -exec chmod 0755 {} \;
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+find . \
+ \( -perm 777 -o -perm 775 -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 {} \;
+
+# Patch to support newer ffmpeg-versions
+patch -p1 -i $CWD/$PRGNAM-3.2.11-offsett.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -57,24 +65,27 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/man \
- --localstatedir=/var
+ --localstatedir=/var \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
-strip --strip-unneeded $PKG/usr/bin/motion
-if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)
-fi
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Let's not clobber the config file
mv $PKG/etc/motion-dist.conf $PKG/etc/motion-dist.conf.new
mv $PKG/usr/share/doc $PKG/usr/doc
-rmdir $PKG/usr/share # We moved the docs from there
+mv $PKG/usr/share/$PRGNAM-$VERSION/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
mkdir -p $PKG/install
diff --git a/system/motion/motion.info b/system/motion/motion.info
index 76d33681ca..257f681156 100644
--- a/system/motion/motion.info
+++ b/system/motion/motion.info
@@ -1,8 +1,8 @@
PRGNAM="motion"
-VERSION="3.2.9"
+VERSION="3.2.11"
HOMEPAGE="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome"
-DOWNLOAD="http://downloads.sourceforge.net/motion/motion-3.2.9.tar.gz"
-MD5SUM="6003011b126c9b17e23e085e7fba6536"
+DOWNLOAD="http://downloads.sourceforge.net/motion/motion-3.2.11.tar.gz"
+MD5SUM="3a26c00f3250eacf6fa93c7a7e0249d9"
MAINTAINER="Martin Lefebvre"
EMAIL="dadexter@sekurity.com"
-APPROVED="rworkman"
+APPROVED="dsomero"