updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / motion-git / PKGBUILD
blob64acf73eb3d8eb90ee36d0d418b5d6c980c4dc4d
1 # Maintainer: mar77i <mysatyre at gmail dot com>
2 # Contributor: Demind <demind@gmail.com>
3 pkgname=motion-git
4 pkgver=20110428
5 pkgrel=1
6 pkgdesc="Motion is a software motion detector. It grabs images from video4linux devices and/or from webcams."
7 arch=('i686' 'x86_64')
8 url="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome"
9 license=('GPL2')
10 depends=('zlib' 'libjpeg')
11 makedepends=('subversion')
12 provides=('motion')
13 conflicts=('motion')
14 install="motion-git.install"
15 source=('rc.motion')
16 md5sums=('fc09828564850824f8549d258053e0b6')
18 _gitroot=https://github.com/sackmotion/motion.git
19 _gitname=motion
21 build() {
22   cd "$srcdir"
23   msg "Performing source checkout..."
24   if [ -d "$_gitname" ]; then
25     cd "$_gitname"
26     git pull origin
27     cd ..
28   else
29     git clone "$_gitroot"
30   fi
32   [ -d "./${_gitname}-build" ] && rm -rf "./${_gitname}-build"
33   cp -r "./${_gitname}" "./${_gitname}-build"
34   cd "./${_gitname}-build"
36   msg "GIT checkout done or server timeout"
37   msg "Starting build"
39   sed -i 's@<linux/videodev.h>@<libv4l1.h>\n#include <linux/videodev2.h>@' *.c *.h
41   ./configure \
42     --prefix=/usr \
43     --sysconfdir=/etc
45   make
46   make DESTDIR="$pkgdir" install
47   install -D -m755 "$srcdir/rc.motion" "$pkgdir/etc/rc.d/motion"