# Contributor: Petteri Tolonen # Maintainer: Petteri Tolonen pkgname=crystalhd-git pkgver=20111227 pkgrel=1 pkgdesc="Broadcom CrystalHD kernel module" arch=('i686' 'x86_64') url="http://linuxtv.org/git/jarod/crystalhd.git" license=('GPL2') depends=('libcrystalhd-git') makedepends=('autoconf' 'make' 'git') install='crystalhd-git.install' conflicts=('crystalhd') _gitroot='git://linuxtv.org/jarod/crystalhd.git' _gitname='crystalhd' build() { cd $startdir/src msg "Connecting to the GIT server...." if [ -d $startdir/src/$_gitname ] ; then cd $_gitname && git pull origin msg "The local files are updated." else git clone $_gitroot cd $_gitname fi cd driver/linux autoconf ./configure --prefix=/usr sed -i 's/'-Werror'/''/g' Makefile if ! grep -q "" $srcdir/crystalhd/driver/linux/crystalhd_flea_ddr.c then sed -i '26i #include ' $srcdir/crystalhd/driver/linux/crystalhd_flea_ddr.c fi make || return 1 mkdir -p $pkgdir/etc/udev/rules.d mkdir -p $pkgdir/lib/modules/$(uname -r)/kernel/drivers/video/broadcom cp -f 20-crystalhd.rules $pkgdir/etc/udev/rules.d/ install -d $pkgdir/lib/modules/$(uname -r)/kernel/drivers/video/broadcom install -m 0644 crystalhd.ko $pkgdir/lib/modules/$(uname -r)/kernel/drivers/video/broadcom } md5sums=()