# $Id: PKGBUILD 86650 2010-08-02 19:36:00Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libdrm
pkgver=2.4.22
pkgrel=1
pkgdesc="Userspace interface to kernel DRM services"
arch=('i686' 'x86_64')
license=('custom')
depends=('glibc')
options=('!libtool')
url="http://dri.freedesktop.org/"
source=(http://dri.freedesktop.org/${pkgname}/${pkgname}-${pkgver}.tar.bz2
        no-pthread-stubs.patch
        COPYING)
     
build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -Np1 -i "${srcdir}/no-pthread-stubs.patch"
  libtoolize --force
  aclocal
  autoconf
  automake
  ./configure --prefix=/usr \
      --enable-intel --enable-radeon \
      --enable-vmwgfx-experimental-api --enable-nouveau-experimental-api \
      --enable-udev
  make
}
package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 "${srcdir}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/"
}
md5sums=('3bdfa33f35d1c902e5115cceb5500c83'
         '9b5ec3bbebe86921e2057694c42f65b8'
         'ba65e71c481b94ef0fb6c23c7f21ffa1')