# Contributor: rubicon <rubicon@mailo.com>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=gleam
pkgver=1.6.3
pkgrel=0
pkgdesc="Statically-typed language that compiles to Erlang and JS"
url="https://gleam.run/"
arch="all"
license="Apache-2.0"
depends="erlang-dev"
makedepends="cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/gleam-lang/gleam/archive/refs/tags/v$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dvm755 target/release/gleam -t "$pkgdir"/usr/bin/
}

sha512sums="
29bf39f5113f1c0e979788c435cbea0683d5d31836464673c008d9ae042d82876687d72dae6980892b1936606452af326943af6c2b181ba4ad5e63eb37aeeea3  gleam-1.6.3.tar.gz
"
