# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=murex
pkgver=6.4.2063
pkgrel=1
pkgdesc="Intuitive, typed and content aware shell"
url="https://murex.rocks/"
# armhf, armv7, x86: tests fail
arch="all !armhf !armv7 !x86"
license="GPL-2.0-only"
makedepends="go"
checkdepends="aspell"
subpackages="$pkgname-doc"
source="https://github.com/lmorg/murex/archive/v$pkgver/murex-$pkgver.tar.gz
	update-go-modules.patch
	"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v
}

check() {
	go test -v ./...
}

package() {
	install -Dvm755 murex -t "$pkgdir"/usr/bin/

	install -dvm755 "$pkgdir"/usr/share/doc
	cp -rv docs "$pkgdir"/usr/share/doc/$pkgname
	cp -rv examples "$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="
3ac580ee63890aa61397168ad2070a497ade89df55487b04e9047594dc06c59dbee704da180dafd40ede61961be728cb562531b04bdcddd85c912e2c96bb2404  murex-6.4.2063.tar.gz
d957edca16ab8177e2b7a847f59c07ce27b24ddc32902dd61e170fc9e97bd7d78a0eab0792697ad74b8de553e158492c5ee2d65c092e97baf7c59cda1bd2eb65  update-go-modules.patch
"
