summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Strogin <stefan.strogin@gmail.com>2019-02-05 13:55:53 +0200
committerJames Le Cuirot <chewi@gentoo.org>2019-02-05 21:42:32 +0000
commit4b819c24ab015129d190ae1fd3ad1247b694f839 (patch)
tree7debdbb1921dd2a4f565538cf5dfdce5aba184ef /games-roguelike/moria
parentdev-libs/gmp: allow user patches (diff)
downloadgentoo-4b819c24ab015129d190ae1fd3ad1247b694f839.tar.gz
gentoo-4b819c24ab015129d190ae1fd3ad1247b694f839.tar.bz2
gentoo-4b819c24ab015129d190ae1fd3ad1247b694f839.zip
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 <stefan.strogin@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/10986 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-roguelike/moria')
-rw-r--r--games-roguelike/moria/moria-5.7.10.ebuild15
1 files changed, 13 insertions, 2 deletions
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 <user>"
+ elog
+}