1 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
7 pkgdesc="Microdia kernel driver for USB webcams with vendor id 0c45"
9 url="http://groups.google.com/group/microdia"
11 depends=('kernel26>=2.6.32' 'kernel26<2.6.33')
12 makedepends=('kernel26-headers>=2.6.32' 'kernel26-headers<2.6.33' 'git' 'ctags')
13 install=microdia-git.install
17 _gitroot="git://repo.or.cz/microdia.git"
22 msg "Connecting to GIT server...."
24 if [ -d ${srcdir}/$_gitname ] ; then
25 cd $_gitname && git pull origin
26 msg "The local files are updated."
31 msg "GIT checkout done or server timeout"
32 msg "Starting make..."
34 rm -rf ${srcdir}/$_gitname-build
35 cp -r ${srcdir}/$_gitname ${srcdir}/$_gitname-build
36 cd ${srcdir}/$_gitname-build
38 sed -i -e "s/KERNEL_VERSION = .*/KERNEL_VERSION = ${_kernver}/" Makefile
39 make KVER=$_kernver || return 1
41 #Install kernel module
42 install -D -m644 sn9c20x.ko ${pkgdir}/lib/modules/$_kernver/kernel/drivers/media/video/usbvideo/sn9c20x.ko
43 sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" ${startdir}/${pkgname}.install || return 1