# Maintainer: Alexander Rosenberg <zanderpkg at pm dot me>

_pkgname='nvramtool'
pkgname=$_pkgname-git
pkgver=4.20.77.ga398b31108
pkgrel=1
pkgdesc='Coreboot cli utility for modifying NVRAM'
url='https://coreboot.org'
arch=('x86_64')
license=('GPL2')
provides=('nvramtool')
makedepends=('git')
source=('git+https://github.com/coreboot/coreboot.git')
sha256sums=('SKIP')

pkgver(){
  cd "coreboot"
  git describe --tags --long | sed 's#-#.#g'
}

build() {
    make -C 'coreboot/util/nvramtool'
}

package() {
    install -Dt "$pkgdir/usr/bin/" "coreboot/util/nvramtool/nvramtool"
}
