# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vala-lint
pkgver=0_git20220216
_sha=2f8a970cbf41ac54d2b4124c9d7db64543031901
pkgrel=2
pkgdesc="Check code-style of Vala code files"
url="https://github.com/vala-lang/vala-lint"
arch="all"
options="!check" # https://gitlab.alpinelinux.org/alpine/aports/-/issues/15455
license="GPL-2.0-or-later"
makedepends="meson glib-dev vala"
source="$pkgname-$pkgver.tar.gz::https://github.com/vala-lang/vala-lint/archive/$_sha.tar.gz"
builddir="$srcdir/vala-lint-$_sha"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
99004d41847db31109a6937dc1445bbf6c05f353b1a94824603e2e0babd36bae88c65dc5915649fb85f7db294511058159785de0dcc4445ecea833e7c9e9e683  vala-lint-0_git20220216.tar.gz
"
