# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ameba
pkgver=1.6.3
pkgrel=0
pkgdesc="Static code analysis tool for Crystal"
url="https://github.com/crystal-ameba/ameba"
# others: blocked by crystal
arch="x86_64 aarch64"
license="MIT"
makedepends="
	crystal
	libxml2-dev
	shards
	yaml-dev
	"
source="https://github.com/crystal-ameba/ameba/archive/v$pkgver/ameba-$pkgver.tar.gz"

export CRYSTAL_CACHE_DIR="$srcdir/.cache"

build() {
	make CRFLAGS="--release -Dpreview_mt"
}

check() {
	make test SPEC_FLAGS="--no-color"
}

package() {
	make CRFLAGS="--release -Dpreview_mt" install PREFIX="$pkgdir/usr"
}

sha512sums="
68a5d4b05d098d9b67b54ce226889851ddef924da47e26e715a2af76e9232be23797a0b981dcc9f37d48073792c0b2834dd454de23031fddc0b974ebef17b368  ameba-1.6.3.tar.gz
"
