updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / linux-uvc-flip-git / PKGBUILD
blob6112abe2621a2099317fcbb12544d22b55c86064
1 # Maintainer: Adam Vogt <vogt.adam@gmail.com> # adapted to the fliped git repo
2 # Contributor: Andrea Scarpino <bash.lnx@gmail.com>
3 # Contributor: Giovanni Scafora <linuxmania@gmail.com>
4 # Contributor: Robert Emil Berge <filoktetes@linuxophic.org>
6 _kernver=`uname -r | sed 's/-ARCH//'`
7 pkgname=linux-uvc-flip-git
8 pkgver=20081117
9 pkgrel=1
10 pkgdesc="Linux driver for USB Video Class devices, patched to flip the video"
11 arch=('i686' 'x86_64')
12 url="http://linux-uvc.berlios.de"
13 license=('GPL2')
14 depends=("kernel26")
15 makedepends=('git')
16 install=linux-uvc.install
17 source=()
18 md5sums=()
20 _gitroot="git://github.com/dfu/linux-uvc_flip.git"
21 _gitname="linux-uvc_flip"
23 build() {
24   cd $startdir/src
25   msg "Connecting to GIT server...."
27   if [ -d $startdir/src/$_gitname ] ; then
28     cd $_gitname && git pull origin
29     msg "The local files are updated."
30   else
31     git clone $_gitroot
32   fi
34   msg "GIT checkout done or server timeout"
35   msg "Starting make..."
37   rm -r $startdir/src/$_gitname-build
38   cp -r $startdir/src/$_gitname $startdir/src/$_gitname-build
39   cd $startdir/src/$_gitname-build
41   make  || return 1
42   #Install kernel module as uvcvideo-flip
43   install -D -m644 uvcvideo.ko $pkgdir/lib/modules/`uname -r`/\
44     kernel/drivers/media/video/uvc/uvcvideo-flip.ko
45   sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='`uname -r`'/" $startdir/*.install