# Maintainer: Connor Behan <connor.behan@gmail.com>
# Contributor: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Christian Storm <Christian.Storm@gmx.DE>
# Contributor: James Rayner <james@archlinux.org>
# Contributor: Thayer Williams <thayer@archlinux.org>

pkgname=vbetool
pkgver=1.2.2
pkgrel=4
pkgdesc="Uses lrmi in order to run code from the video BIOS"
url="https://www.codon.org.uk/~mjg59/vbetool/"
license=('GPL2')
arch=('x86_64')
depends=('zlib' 'libx86' 'libpciaccess')
makedepends=('pciutils')
source=("https://cgit.freedesktop.org/~airlied/${pkgname}/snapshot/${pkgname}-${pkgver}.tar.gz"
        'no_x86_check.patch')
md5sums=('SKIP'
         'f4abc1181c0cda966626cbe5872d678f')

build() {
  cd "${srcdir}"/$pkgname-$pkgver
  patch -Np1 -i ../no_x86_check.patch
  ./autogen.sh --prefix=/usr --sbindir=/usr/bin
  make LIBS=-lpci
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
}
