# Contributor: Ɓukasz Jendrysik # Contributor: Mika Havela # Maintainer: Mika Havela pkgname=motion pkgver=3.2.12 pkgrel=3 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 linux-headers" # 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 pthread_key_create.patch get_current_dir_name.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 \ --without-ffmpeg \ 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 1eca97b280069ad0f1d5cb9946145907 pthread_key_create.patch bd58201a2d4724457b668fb65f7b17c3 get_current_dir_name.patch" sha256sums="a597f8d7ec0bf3c5fb62722c4eead59717fe01c2ae0d256c642027cea74b2f0a motion-3.2.12.tar.gz a89d6b9b070d9447694a3acb9c20768bf232ff37d45728aee7f972f5a0a2b855 motion.confd f65843332b1d342058fcb96f139d2334105a009af10692f4dd619d4ccf63eb85 motion.initd f164f1c290734378823559bb3f643316f8da8eb61d6fe720761ad4f369a6a074 motion-dist.conf.in.patch 7658950a54363b8aa8090c508f3864f2e15af9def10bdc96f18cdac7cb141ef0 pthread_key_create.patch 8cdf811aa274f08c02bd0b3e67548d337f1472d1a9c041c129deeb15ab74fa7d get_current_dir_name.patch" sha512sums="d44620f8865420da71ff1dc1e1d8ba8e5465b395f2cf3b2cc9a91d3d415694b26376a9f8e3a1b78ffd0efde22d9e0338daa77237aed38c060dc3577af4c0864c motion-3.2.12.tar.gz 37821907f3b974675be2584460f499e83c3745ee70fa4674e82186fa9f9c04346e3d4a83a0eb3133bdb33ecee169bf590f6d3eda45ef54958f8babdce446ea08 motion.confd a589e56929a5091c1e398f81b9f1744f393006b429a27e5b7227326e3afc4dd792e30486d66f608208eec18e7062e14f673493aafd55a5fed9d33d160bc723a0 motion.initd f45fb8f95b7b336b72acf04b29f30413fae1d247d3ad430c36862475ce3148e210d3feb390dc898a369470da20c16c2d26fd018dcb9a7cfe1e4e9c95a46d0f75 motion-dist.conf.in.patch 17da7b1d2c15b5f95246e8c8f88ff82c090110a950f41d02c55840265d46b8838511602f4da489c16b0e31a1b346345a208994b529064771a37e436ad49650e9 pthread_key_create.patch c1d11dd378673f85db290a1d181b7aa454baac7d6ed77a46cdc24cc83c1fc708bafbd76d851767256b797dae4d2032efecbd6e66ffe532b8fda61d2d920b7d58 get_current_dir_name.patch"