# Template file for 'supersonic-desktop'
pkgname=supersonic-desktop
version=0.21.0
revision=1
build_style=go
go_import_path="github.com/dweymouth/supersonic"
hostmakedepends="pkg-config"
makedepends="mpv-devel libXcursor-devel libXxf86vm-devel"
short_desc="Lightweight cross-platform desktop client for self-hosted music servers"
maintainer="Hendrik Boll <fanyx@posteo.net>"
license="GPL-3.0-or-later"
homepage="https://github.com/dweymouth/supersonic"
changelog="https://raw.githubusercontent.com/dweymouth/supersonic/refs/heads/main/CHANGELOG.md"
distfiles="https://github.com/dweymouth/supersonic/archive/v${version}.tar.gz"
checksum=b532e5fb0c2e03949a704ac12576713a85eb1890012befd2f2479caa35723804

post_install() {
	mv "${DESTDIR}/usr/bin/supersonic" "${DESTDIR}/usr/bin/supersonic-desktop"

	for i in 128 256 512; do
		vinstall res/appicon-$i.png 644 usr/share/icons/hicolor/${i}x${i}/apps supersonic-desktop.png
	done

	vinstall res/supersonic-desktop.desktop 644 usr/share/applications
}
