# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xf86-video-fbdev-rm
pkgver=0.5.0
pkgrel=3
pkgdesc="Video driver for framebuffer device with rM patches"
url="https://www.x.org"
arch="all"
license="MIT"
subpackages="$pkgname-doc"
provides="xf86-video-fbdev=$pkgver-r$pkgrel"
makedepends="xorg-server-dev libxi-dev util-macros xorgproto linux-rm-headers"
builddir="$srcdir"/xf86-video-fbdev-$pkgver
source="
	https://www.x.org/releases/individual/driver/xf86-video-fbdev-$pkgver.tar.bz2
	epdc_auto-update-patch.patch
	fix-build.patch
	"

build() {
	export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
c1217b943bbe3301b3c2a8649ed1004c3c67b02607bd56bbc14f6dfa05e7f0184332c81a6a19595514745501ed88526aee932e555779b7c3a8233646b0979448  xf86-video-fbdev-0.5.0.tar.bz2
c211a2edf90b622d522a0513358431afa33c7b3b958b054221ff3a6e8ff72d1012b0141b073ea070f4bb2d2f9042d8e092434f14a91bea3bf8bf188c78c0bcb7  epdc_auto-update-patch.patch
19c6680d8e8b0ba3903fb76438b54f294a1715b93d50e1cb2ef95bb04770add5fdad1df4260ab7eb00bb26578baa79b7cfed3f7fa6cba70348611cc3797af3ee  fix-build.patch
"
