# Template file for 'gamemode'
pkgname=gamemode
version=1.7
revision=1
build_style=meson
configure_args="-Dwith-sd-bus-provider=elogind -Dwith-pam-group=gamemode"
hostmakedepends="pkg-config"
makedepends="inih-devel dbus-devel elogind-devel"
depends="lib${pkgname}>=${version}_${revision}"
short_desc="Optimise Linux system performance on demand"
maintainer="Kenneth Dodrill <hello@kennydodrill.com>"
license="BSD-3-Clause"
homepage="https://github.com/FeralInteractive/gamemode"
changelog="https://raw.githubusercontent.com/FeralInteractive/gamemode/master/CHANGELOG.md"
distfiles="https://github.com/FeralInteractive/gamemode/archive/${version}.tar.gz"
checksum=8a1718c657cb1d3c8269edfd397faf3cb41fccd885198ef0225bf8f82217c42f
system_groups=gamemode

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

libgamemode_package() {
	short_desc+=" - shared libraries"
	pkg_install() {
		# For compatibility reasons, all shlibs should go in libgamemode
		vmove "usr/lib/*.so*"
	}
}

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