# Template file for 'gamemode'
pkgname=gamemode
version=1.8.2
revision=1
build_style=meson
configure_args="-Dwith-sd-bus-provider=elogind -Dwith-privileged-group=gamemode"
hostmakedepends="pkg-config"
makedepends="inih-devel dbus-devel elogind-devel"
short_desc="Optimise Linux system performance on demand"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://github.com/FeralInteractive/gamemode"
changelog="https://raw.githubusercontent.com/FeralInteractive/gamemode/${version}/CHANGELOG.md"
distfiles="https://github.com/FeralInteractive/gamemode/archive/${version}.tar.gz"
checksum=2b4a20894822caf04767af6a1601130d6b718fc30b8a77895607341b1674740f
shlib_requires="libgamemode.so.0 libgamemodeauto.so.0"
system_groups=gamemode

post_install() {
	vsconf example/gamemode.ini
	vlicense LICENSE.txt
	vdoc README.md
}

libgamemode_package() {
	short_desc+=" - shared libraries"
	pkg_install() {
		vmove "usr/lib/*.so.*"
	}
}

libgamemode-devel_package() {
	short_desc+=" - development files"
	depends="lib${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove "usr/lib/*.so"
		vmove usr/lib/pkgconfig
		vmove usr/include
	}
}
