# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=efibootmgr
_commit=712aeb81311de28a3fcfea7465dcb93743f07a53  # refs/tags/18
pkgver=18
pkgrel=3
pkgdesc="Linux user-space application to modify the EFI Boot Manager"
arch=(x86_64)
url="https://github.com/rhboot/efibootmgr"
license=(GPL-2.0-or-later)
depends=(
  glibc
  popt
)
makedepends=(
  efivar
  git
)
source=($pkgname::git+$url#tag=$_commit?signed)
sha512sums=('SKIP')
  'B00B48BC731AA8840FED9FB0EED266B70F4FEF10'  # Peter Jones <pjones@redhat.com>
  '039A9CEA19DE9508C36875AA2532F9176A95A442'  # Robbie Harwood (work) <rharwood@redhat.com>
)

build() {
  make libdir=/usr/lib sbindir=/usr/bin EFIDIR=arch -C $pkgname
}

package() {
  depends+=(
    efivar libefiboot.so libefivar.so
  )

  make DESTDIR="$pkgdir" libdir=/usr/lib sbindir=/usr/bin EFIDIR=arch install -C $pkgname
  install -vDm 644 $pkgname/{AUTHORS,README,README.md,TODO} -t "$pkgdir/usr/share/doc/$pkgname/"
}
