# Contributor: knuxify <knuxify@gmail.com>
# Maintainer: knuxify <knuxify@gmail.com>
maintainer="knuxify <knuxify@gmail.com>"
pkgname=eartag
pkgver=0.6.5
pkgrel=0
pkgdesc="Small and simple music tag editor that doesn't try to manage your entire library"
url="https://gitlab.gnome.org/World/eartag"
arch="noarch"
license="MIT"
depends="python3
	py3-gobject3
	gtk4.0
	libadwaita
	py3-magic
	py3-mutagen
	py3-pillow
	py3-pyacoustid
	"
makedepends="meson blueprint-compiler glib-dev desktop-file-utils"
checkdepends="appstream-glib py3-pytest"
subpackages="$pkgname-doc $pkgname-lang"
source="https://gitlab.gnome.org/World/eartag/-/archive/$pkgver/eartag-$pkgver.tar.gz"

if [ "$CARCH" = "s390x" ]; then
	# test failure on s390x, likely caused by py3-magic, but only for
	# rarely-used .wma files
	options="!check"
fi

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

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

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="
8435459ed8eb04bfed3eaa54bde733b707e33a03b2cc9a2428819415367cd0dcef1ba77ea787b616e493355df9dc2b93e5327483e3f2293f6397e08eee0acac9  eartag-0.6.5.tar.gz
"
