void-packages/srcpkgs/vboot-utils/template
Đoàn Trần Công Danh 76acfa2dd2 srcpkgs/v*: 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

39 lines
1.2 KiB
Bash

# Template file for 'vboot-utils'
pkgname=vboot-utils
version=89.13729
revision=2
_version=${version/./-}
archs="x86_64* i686* aarch64* arm*"
create_wrksrc=yes
build_style=gnu-makefile
make_use_env=yes
hostmakedepends="pkg-config"
makedepends="openssl-devel libuuid-devel zlib-devel"
short_desc="Verified boot kernel utilities"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://chromium.googlesource.com/chromiumos/platform/vboot_reference.git"
distfiles="https://chromium.googlesource.com/chromiumos/platform/vboot_reference.git/+archive/refs/heads/release-R${_version}.B.tar.gz"
checksum=@3d8edd7e3a1672b29f02d93c4cf89f19ad7477694968b0653aa968783c8ba3e6
# 2crypto specifies a section for some variables, which lead to text relocations in the binary
# let's play it safe and disable PIE
nopie=yes
case $XBPS_TARGET_MACHINE in
x86_64*) _arch=x86_64 ;;
i686*) _arch=x86 ;;
arm*|aarch64*) _arch=arm ;;
*) broken="This package doesn't have a configuration for this target" ;;
esac
make_build_args="ARCH=${_arch} WERROR="
if [ "$XBPS_TARGET_LIBC" = musl ]; then
makedepends+=" musl-fts-devel"
export LDLIBS="-lfts"
fi
post_install() {
vmkdir usr/share/vboot
vcopy tests/devkeys usr/share/vboot/devkeys
vlicense LICENSE
}