name=gamemode
version=1.8
release=1
desc="Optimise the system while a game runs"
url="https://github.com/FeralInteractive/gamemode"
license="BSD-3-Clause"
depend="glibc dbus inih"
makedepend="meson ninja"
source="https://github.com/FeralInteractive/gamemode/archive/refs/tags/1.8.tar.gz"
sha256="SKIP"

build() {
	unset LD_LIBRARY_PATH
	cd "gamemode-1.8"
	meson setup build \
		--prefix=/usr \
		--libdir=/usr/lib \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--buildtype=release \
		--wrap-mode=nodownload \
		-Db_lto=true
	ninja -C build -j"$JOBS"
}

package() {
	unset LD_LIBRARY_PATH
	cd "gamemode-1.8"
	DESTDIR="$pkgdir" ninja -C build install
}
