# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca>
pkgname=harec
pkgver=0.24.2
pkgrel=0
pkgdesc="The Hare compiler"
url="https://harelang.org"
arch="x86_64 aarch64 riscv64"
license="GPL-3.0-only"
depends="qbe"
source="
	$pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/harec/archive/$pkgver.tar.gz
"

build() {
	cp configs/linux.mk ./config.mk
	make PREFIX=/usr ARCH=$CARCH
}

check() {
	make ARCH=$CARCH check
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" install
}

sha512sums="
3b32e82df937de1fdd2af20a2162bc3754cb9178cd67e56f3e7bc7fc9eb9e9bad5609ca1c328d42ac5cdd527edf6d9c381dc384df72c2d7666c7ce5684871a17  harec-0.24.2.tar.gz
"
