# Contributor: Mika Havela # Maintainer: Mika Havela pkgname=motion pkgver=3.2.12 pkgrel=0 pkgdesc="Detect if a significant part of the picture has changed (e.g. from a webcam)." url="http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome" arch="all" license="GPL2" pkgusers="motion" pkggroups="motion" depends="jpeg v4l-utils" # Add ffmpeg (when motion is patched/fixed for this) depends_dev="" makedepends="$depends_dev bash jpeg-dev v4l-utils-dev" # Add ffmpeg-dev (when motion is patched/fixed for this) install="$pkgname.pre-install" subpackages="$pkgname-doc" source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz motion.confd motion.initd motion-dist.conf.in.patch" _builddir="$srcdir"/$pkgname-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done sed -i 's@@\n#include @' *.c *.h } build() { cd "$_builddir" ./configure \ --prefix=/usr \ --sysconfdir=/etc/motion make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 install -d -o "$pkgusers" -g "$pkggroups" "$pkgdir"/var/run/motion install -d -o "$pkgusers" -g "$pkggroups" "$pkgdir"/home/motion/motion_captures # Default config is configured to store captures here install -Dm644 "$srcdir"/"$pkgname".confd "$pkgdir"/etc/conf.d/"$pkgname" install -Dm755 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/"$pkgname" install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING } md5sums="1ba0065ed50509aaffb171594c689f46 motion-3.2.12.tar.gz c444bfd48ac8d6272d5191836ceb544a motion.confd 3acfe162df3fec28c88c1688e7385189 motion.initd 2ee4fa214987e7643025732f016e9296 motion-dist.conf.in.patch"