Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-roguelike/moria/
Date: Tue, 05 Feb 2019 21:42:47
Message-Id: 1549402952.4b819c24ab015129d190ae1fd3ad1247b694f839.chewi@gentoo
1 commit: 4b819c24ab015129d190ae1fd3ad1247b694f839
2 Author: Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
3 AuthorDate: Tue Feb 5 11:55:53 2019 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 5 21:42:32 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b819c24
7
8 games-roguelike/moria: use 'gamestat' group for accessing data files
9
10 Closes: https://bugs.gentoo.org/677204
11 Package-Manager: Portage-2.3.59, Repoman-2.3.12
12 Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>
13 Closes: https://github.com/gentoo/gentoo/pull/10986
14 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
15
16 games-roguelike/moria/moria-5.7.10.ebuild | 15 +++++++++++++--
17 1 file changed, 13 insertions(+), 2 deletions(-)
18
19 diff --git a/games-roguelike/moria/moria-5.7.10.ebuild b/games-roguelike/moria/moria-5.7.10.ebuild
20 index a5e1c54cf23..1f337859cbc 100644
21 --- a/games-roguelike/moria/moria-5.7.10.ebuild
22 +++ b/games-roguelike/moria/moria-5.7.10.ebuild
23 @@ -4,7 +4,7 @@
24 EAPI=7
25
26 CMAKE_IN_SOURCE_BUILD="yes"
27 -inherit cmake-utils
28 +inherit cmake-utils user
29
30 DESCRIPTION="The Dungeons of Moria, a single player roguelike game, also known as Umoria"
31 HOMEPAGE="https://umoria.org/"
32 @@ -23,6 +23,10 @@ S="${WORKDIR}/umoria-${PV}"
33
34 PATCHES=( "${FILESDIR}/${P}-gentoo-paths.patch" )
35
36 +pkg_setup(){
37 + enewgroup gamestat 36
38 +}
39 +
40 src_prepare() {
41 cmake-utils_src_prepare
42 sed -i "s/@PF@/${PF}/" src/config.cpp || die
43 @@ -36,7 +40,7 @@ src_install() {
44
45 insinto /var/lib/moria
46 doins data/scores.dat
47 - fowners root:games /var/lib/moria/scores.dat
48 + fowners root:gamestat /var/lib/moria/scores.dat
49 fperms g+w /var/lib/moria/scores.dat
50
51 doman "${FILESDIR}"/${PN}.6
52 @@ -47,3 +51,10 @@ src_install() {
53 doins LICENSE
54 docompress -x /usr/share/doc/${PF}/LICENSE
55 }
56 +
57 +pkg_postinst() {
58 + elog
59 + elog "Please add users to the 'gamestat' group, so they can run Moria:"
60 + elog " usermod -aG gamestat <user>"
61 + elog
62 +}