# Template file for 'kristall'
pkgname=kristall
version=0.4
revision=2
build_wrksrc=src
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-devel qt5-multimedia-devel qt5-svg-devel"
short_desc="Small-Internet Browser"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://kristall.random-projects.net"
distfiles="https://github.com/MasterQ32/kristall/archive/V${version}.tar.gz
 https://raw.githubusercontent.com/MasterQ32/kristall/master/kristall-mime-info.xml"
checksum="1547e60978c73783d0737af3ccea6abfcf7ec214e8dedc91157ef3f88453be8f
 287f63fb3f1dfa0577fe2efb6f421a3299a928dfe139cb2a05c571aa171c2c9b"
skip_extraction="kristall-mime-info.xml"

pre_configure() {
	vsed -i kristall.pro -e 's;/opt/$${TARGET}/;/usr/;'
	cp -pv ${XBPS_SRCDISTDIR}/${pkgname}-${version}/kristall-mime-info.xml ${wrksrc}
}

post_install() {
	local share=usr/share icons=usr/share/icons
	vinstall icons/kristall.svg 644 ${icons}/hicolor/scalable/apps net.random-projects.kristall.svg
	vinstall icons/kristall-16.png 644 ${icons}/hicolor/16x16/apps net.random-projects.kristall.png
	vinstall icons/kristall-32.png 644 ${icons}/hicolor/32x32/apps net.random-projects.kristall.png
	vinstall icons/kristall-64.png 644 ${icons}/hicolor/64x64/apps net.random-projects.kristall.png
	vinstall icons/kristall-128.png 644 ${icons}/hicolor/128x128/apps net.random-projects.kristall.png
	vinstall ${wrksrc}/Kristall.desktop 644 ${share}/applications
	vinstall ${wrksrc}/kristall-mime-info.xml 644 ${share}/mime/packages kristall.xml

}
