# Contributor: Nikita Travkin # Maintainer: Nikita Travkin pkgname=dtbloader pkgver=1.2.1 pkgrel=0 pkgdesc="EFI driver that finds and installs DeviceTree into the UEFI configuration table" url="https://github.com/TravMurav/dtbloader" arch="aarch64" license="BSD-3-Clause" makedepends="clang cmd:llvm-ar lld" options="!check" subpackages="$pkgname-boot-deploy:boot_deploy" source="https://github.com/TravMurav/dtbloader/releases/download/$pkgver/dtbloader-$pkgver.tar.gz" builddir="$srcdir" build() { make \ ABORT_IF_UNSUPPORTED=1 \ O=build ./scripts/get_supported_dtbs.sh > "$builddir"/build/dtbs.txt } package() { install -Dt "$pkgdir"/usr/share/dtbloader \ "$builddir"/build/dtbloader.efi \ "$builddir"/build/dtbs.txt } boot_deploy() { pkgdesc="boot-deploy integration for dtbloader" install_if="$pkgname=$pkgver-r$pkgrel boot-deploy" mkdir -p "$subpkgdir"/usr/share/boot-deploy/efi-drivers/ ln -s /usr/share/dtbloader/dtbloader.efi \ "$subpkgdir"/usr/share/boot-deploy/efi-drivers/dtbloaderaa64.efi } sha512sums=" 1dbe4e65527a2b611ef4573de374183456e54a3da1cd7ffe5f22d5394a49d7b47d1e3ed5e24c845af4dfb3e77bad8df4f1e9abde528309e0fe877a1364615d7d dtbloader-1.2.1.tar.gz "