aboutsummaryrefslogtreecommitdiffstats
path: root/testing/motion/APKBUILD
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2012-11-07 17:04:52 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-11-07 18:57:52 +0000
commit9c79223546389e13100a8e367688fffcb23c05ea (patch)
treea099191b78860a70aa87f3f161b9e80a536d0d97 /testing/motion/APKBUILD
parentc8a4b51e4a13d9aa435a3b7503702d7762fb545c (diff)
downloadaports-9c79223546389e13100a8e367688fffcb23c05ea.tar.bz2
aports-9c79223546389e13100a8e367688fffcb23c05ea.tar.xz
testing/motion: new aport
Diffstat (limited to 'testing/motion/APKBUILD')
-rw-r--r--testing/motion/APKBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/motion/APKBUILD b/testing/motion/APKBUILD
new file mode 100644
index 0000000000..731ae5ad83
--- /dev/null
+++ b/testing/motion/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+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@<linux/videodev.h>@<libv4l1.h>\n#include <linux/videodev2.h>@' *.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"