description="Tool to modify UEFI Firmware Boot Manager Variables"
url="https://github.com/rhinstaller/efibootmgr"

packager="tnut <tnut@nutyx.org>"

makedepends=(efivar)

name=efibootmgr
version=17
release=2

PKGMK_KEEP_SOURCES="no"
source=($name-$version-parse_opts-1.patch
        https://github.com/rhboot/$name/archive/$version.tar.gz)

build() {
cd $name-$version
patch -Np1 -i ../$name-$version-parse_opts-1.patch
make EXTRA_CFLAGS="-Os" EFIDIR="/boot/EFI"
install -d ${PKG}/usr/bin
install -D -m0755 src/efibootmgr ${PKG}/usr/bin/efibootmgr
install -d ${PKG}/usr/share/man/man8
install -D -m0644 src/efibootmgr.8 ${PKG}/usr/share/man/man8/efibootmgr.8
install -D -m0644 src/efibootdump.8 ${PKG}/usr/share/man/man8/efibootdump.8
}
