# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sound-juicer
pkgver=3.38.0
pkgrel=3
pkgdesc="Sound Juicer is a CD ripping tool using GTK+ and GStreamer"
url="https://wiki.gnome.org/Apps/SoundJuicer"
# riscv64 disabled due to missing rust in recursive dependency
arch="all !s390x !riscv64" # Limited by brasero
license="GPL-2.0-or-later"
depends="iso-codes gsettings-desktop-schemas gst-plugins-good"
makedepends="glib-dev gtk+3.0-dev brasero-dev gstreamer-dev
	gst-plugins-base-dev libmusicbrainz-dev iso-codes-dev itstool libcanberra-dev
	gsettings-desktop-schemas-dev gstreamer-tools libdiscid-dev meson"
checkdepends="appstream-glib"
subpackages="$pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/sound-juicer/${pkgver%.*}/sound-juicer-$pkgver.tar.xz
	meson-0.60.patch
	metainfo.patch
	"

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="
d76d38839c1f5a997a900d0ba4f43d59e38d9a1d547f51bdf15d1aa9ee0a2b24210a876bfccb7b221feb1adab5882ac1d884da6131a0f259dd985326222eff9f  sound-juicer-3.38.0.tar.xz
99e740bb508a92d74b942b68d40f0ecca83e8508096c8f7771f138f811c3220850f46cbd9449010c1966c4927ecf5423be27cf6e27fa228ca6b33976e89af3c2  meson-0.60.patch
043bf8525d9da12d0168fad4b628e482dd8e2244c99b395e8ec6939b15cd20ec2d5ee386fef2ed16d82cf4d839d45ce67ca3b4c675241409bd1502a7aa40d382  metainfo.patch
"
