# Template file for 'clapper'
pkgname=clapper
version=0.10.0
revision=1
build_style=meson
build_helper=gir
hostmakedepends="pkg-config gettext glib-devel vala
 gtk4-update-icon-cache desktop-file-utils"
makedepends="gtk4-devel gstreamer1-devel gst-plugins-base1-devel libadwaita-devel
 libsoup3-devel libmicrodns-devel libpeas2-devel"
short_desc="Modern and user-friendly media player"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later, LGPL-2.1-or-later"
homepage="https://github.com/Rafostar/clapper"
distfiles="https://github.com/Rafostar/clapper/archive/refs/tags/${version}.tar.gz"
checksum=344c0f20e540a63c6fb44cdd5de88c168ed145bb66c1307e79b2b08124780118

clapper-libs_package() {
	short_desc+=" - libraries"
	pkg_install() {
		vmove "usr/lib/*.so.*"
		vmove usr/lib/clapper-0.0
		vmove usr/lib/girepository-1.0
		vmove usr/lib/gstreamer-1.0
		for file in $(find ${DESTDIR}/usr/share/locale -name "clapper-gtk.mo"); do
			vmove ${file/$DESTDIR/}
		done
	}
}

clapper-devel_package() {
	depends="clapper-libs>=${version}_${revision} ${makedepends}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.so"
		vmove usr/lib/pkgconfig
		vmove usr/share/gir-1.0
		vmove usr/share/vala
	}
}
