# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=yaboot
pkgver=1.3.17
pkgrel=0
pkgdesc="A bootloader for openfirmware-based machines (new-world macintosh, as well as ibm rs/6000, pseries and openpower)"
url="http://yaboot.ozlabs.org/"
arch="powerpc"
license="GPL-2.0-or-later"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="http://yaboot.ozlabs.org/releases/$pkgname-$pkgver.tar.gz"

_builddir=
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	make PREFIX="/usr" || return 1
}

package() {
	cd "$_builddir"
	make ROOT="$pkgdir" PREFIX="/usr" install || return 1
}

md5sums="f599f52d1887a86fd798252d2946f635  yaboot-1.3.17.tar.gz"
sha256sums="2fb738d8fd48b94ab2534a4fdf63738ad02c1a30f4b2add91f837baff8fa2aa1  yaboot-1.3.17.tar.gz"
sha512sums="da910c4c6ca2de817342bf4dbcefe2857606043e614782581a86bae206cf6cfe5597ad47aea15369feb60e02d8a4f9f4aa3b12863d715c757584c1f4d7ffb9de  yaboot-1.3.17.tar.gz"
