# $Id: PKGBUILD 88691 2010-08-24 13:31:22Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xf86-video-unichrome
pkgver=0.2.7
pkgrel=4
_gitversion=cd12cce88ff886031c23c743569fba97eccace4e
pkgdesc="Unichrome video drivers for X.Org"
arch=(i686 x86_64)
url="http://unichrome.sf.net/"
license=('custom')
depends=('glibc' 'unichrome-dri')
makedepends=('xorg-server-devel' 'libx11' 'libdrm' 'xf86driproto' 'mesa' 'libxvmc')
options=('!libtool')
conflicts=('xf86-video-via' 'openchrome' 'xf86-video-openchrome' 'xorg-server<1.9.0')
source=(http://cgit.freedesktop.org/~libv/${pkgname}/snapshot/${pkgname}-${_gitversion}.tar.bz2
        drm-include.patch
        LICENSE)
md5sums=('c64332e6c386ed9a580116e131f288f4'
         '4a9bf2e3ef338c170a2f58988ebb97dc'
         '6ea7d64c87c5c32201a1e38e3336e44a')

build() {
  cd "${srcdir}/${pkgname}-${_gitversion}"
  patch -Np0 -i "${srcdir}/drm-include.patch"
  ./autogen.sh --prefix=/usr --enable-dri
  make
  make DESTDIR="${pkgdir}" install
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
}