void-packages/srcpkgs/efibootmgr/template
Đoàn Trần Công Danh a03d116397 srcpkgs/e*: convert patches to -Np1
```sh

git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

50 lines
1.4 KiB
Bash

# Template file for 'efibootmgr'
pkgname=efibootmgr
version=17
revision=6
hostmakedepends="pkg-config"
makedepends="libefivar-devel popt-devel"
short_desc="Tool to modify UEFI Firmware Boot Manager Variables"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://github.com/rhinstaller/efibootmgr"
distfiles="https://github.com/rhinstaller/efibootmgr/releases/download/${version}/${pkgname}-${version}.tar.bz2"
distfiles="https://github.com/rhboot/efibootmgr/archive/${version}.tar.gz"
checksum=22a95ebe0d5c9fb2915b3a100450f8f37484d1dbb8b296f55b343cc84f10397d
conf_files="/etc/default/efibootmgr-kernel-hook"
case "$XBPS_TARGET_MACHINE" in
x86_64*)
EFI_LOADER="grubx64.efi" ;;
i686*)
EFI_LOADER="grub.efi" ;;
aarch64*)
EFI_LOADER="grubaa64.efi" ;;
arm*)
EFI_LOADER="grubarm.efi" ;;
*)
broken="unsupported UEFI for architecture ${XBPS_TARGET_MACHINE}" ;;
esac
do_build() {
make EXTRA_CFLAGS="$CFLAGS" ${makejobs} EFIDIR="void" EFI_LOADER="${EFI_LOADER}"
}
do_install() {
vbin src/efibootdump
vman src/efibootdump.8
vbin src/efibootmgr
vman src/efibootmgr.8
}
post_install() {
vdoc ${FILESDIR}/README.voidlinux
vmkdir etc/
vinstall "${FILESDIR}/efibootmgr-kernel-hook.confd" 644 etc/default efibootmgr-kernel-hook
vinstall ${FILESDIR}/kernel.d/efibootmgr.post-install 744 \
etc/kernel.d/post-install 50-efibootmgr
vinstall ${FILESDIR}/kernel.d/efibootmgr.post-remove 744 \
etc/kernel.d/post-remove 50-efibootmgr
}