# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=compat-pvgrub
pkgver=1
pkgrel=0
pkgdesc="compatibility support for PV-GRUB 1.x"
url="https://www.alpinelinux.org/"
arch="noarch"
license="ISC"
depends=""
depends_dev=""
makedepends="$depends_dev"
triggers="compat-pvgrub.trigger=/boot"
install=""
subpackages=""
source="update-pvgrub"

_builddir="$srcdir"

package() {
	cd "$_builddir"

	mkdir -p "$pkgdir"/boot/grub "$pkgdir"/sbin
	touch "$pkgdir"/boot/grub/.keep-compat-pvgrub

	sed "/^version=/s/=.*/=$pkgver-r$pkgrel/" "$srcdir"/update-pvgrub \
		> "$pkgdir"/sbin/update-pvgrub
	chmod 755 "$pkgdir"/sbin/update-pvgrub
}

md5sums="1e6c8e5b06815bd591d9e8c799240bf9  update-pvgrub"
sha256sums="0fdfcadba17e0a935c8602bd035faf3db7c73e93b6c5443a054794016883c77e  update-pvgrub"
sha512sums="ffddaa19bf4aa953c0360e953a5a84d3be8589ae0304823d11765bc13591e38b8dd74030b0eff21bf77423022b6188e1a9ef751e380c5dd58a9b5f6a0fa1df68  update-pvgrub"
