From 4b819c24ab015129d190ae1fd3ad1247b694f839 Mon Sep 17 00:00:00 2001 From: Stefan Strogin Date: Tue, 5 Feb 2019 13:55:53 +0200 Subject: games-roguelike/moria: use 'gamestat' group for accessing data files Closes: https://bugs.gentoo.org/677204 Package-Manager: Portage-2.3.59, Repoman-2.3.12 Signed-off-by: Stefan Strogin Closes: https://github.com/gentoo/gentoo/pull/10986 Signed-off-by: James Le Cuirot --- games-roguelike/moria/moria-5.7.10.ebuild | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'games-roguelike/moria') diff --git a/games-roguelike/moria/moria-5.7.10.ebuild b/games-roguelike/moria/moria-5.7.10.ebuild index a5e1c54cf230..1f337859cbc4 100644 --- a/games-roguelike/moria/moria-5.7.10.ebuild +++ b/games-roguelike/moria/moria-5.7.10.ebuild @@ -4,7 +4,7 @@ EAPI=7 CMAKE_IN_SOURCE_BUILD="yes" -inherit cmake-utils +inherit cmake-utils user DESCRIPTION="The Dungeons of Moria, a single player roguelike game, also known as Umoria" HOMEPAGE="https://umoria.org/" @@ -23,6 +23,10 @@ S="${WORKDIR}/umoria-${PV}" PATCHES=( "${FILESDIR}/${P}-gentoo-paths.patch" ) +pkg_setup(){ + enewgroup gamestat 36 +} + src_prepare() { cmake-utils_src_prepare sed -i "s/@PF@/${PF}/" src/config.cpp || die @@ -36,7 +40,7 @@ src_install() { insinto /var/lib/moria doins data/scores.dat - fowners root:games /var/lib/moria/scores.dat + fowners root:gamestat /var/lib/moria/scores.dat fperms g+w /var/lib/moria/scores.dat doman "${FILESDIR}"/${PN}.6 @@ -47,3 +51,10 @@ src_install() { doins LICENSE docompress -x /usr/share/doc/${PF}/LICENSE } + +pkg_postinst() { + elog + elog "Please add users to the 'gamestat' group, so they can run Moria:" + elog " usermod -aG gamestat " + elog +} -- cgit v1.2.3-65-gdbad