# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xf86-video-nouveau
pkgver=1.0.15
pkgrel=0
pkgdesc="Open-source X.org drivers for nVidia video cards"
url="https://nouveau.freedesktop.org/"
arch="all"
license="MIT"
depends="mesa-dri-nouveau"
depends_dev=
makedepends="randrproto renderproto videoproto xextproto libdrm-dev
	xorg-server-dev util-macros xf86driproto eudev-dev"
install=""
subpackages="$pkgname-doc"
source="http://www.x.org/archive/individual/driver/$pkgname-$pkgver.tar.bz2"

builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$builddir"
	export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

sha512sums="69a8f8e7920d893f17d14fd9f05e35de246d980a243f3b3b00c05deae7f6bd97e0f51e6ddfa322b4d0815233fe5f656d4e55f54461249f3f24c3bc025a682285  xf86-video-nouveau-1.0.15.tar.bz2"
