dev-qt/qtpaths: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / games-roguelike / moria / moria-5.7.10.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 CMAKE_IN_SOURCE_BUILD="yes"
7 inherit cmake prefix
8
9 DESCRIPTION="The Dungeons of Moria, a single player roguelike game, also known as Umoria"
10 HOMEPAGE="https://umoria.org/"
11 SRC_URI="https://github.com/dungeons-of-moria/umoria/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~m68k ~x86"
16 IUSE=""
17
18 RDEPEND="acct-group/gamestat
19         >=sys-libs/ncurses-6.0:0="
20 DEPEND="${RDEPEND}"
21 BDEPEND="virtual/pkgconfig"
22
23 S="${WORKDIR}/umoria-${PV}"
24
25 PATCHES=(
26         "${FILESDIR}/${P}-gentoo-paths.patch"
27         "${FILESDIR}/${P}-tinfo.patch"
28 )
29
30 src_prepare() {
31         cmake_src_prepare
32         sed -i "s/@PF@/${PF}/" src/config.cpp || die
33         hprefixify src/config.cpp
34 }
35
36 src_install() {
37         newbin umoria/umoria moria
38
39         insinto /usr/share/moria
40         doins data/*.txt
41
42         insinto /var/lib/moria
43         doins data/scores.dat
44         fowners root:gamestat /var/lib/moria/scores.dat
45         fperms g+w /var/lib/moria/scores.dat
46
47         doman "${FILESDIR}"/${PN}.6
48         dodoc -r AUTHORS README.md docs
49
50         # The game binary will look for plain text LICENSE
51         insinto /usr/share/doc/${PF}
52         doins LICENSE
53         docompress -x /usr/share/doc/${PF}/LICENSE
54 }
55
56 pkg_postinst() {
57         elog
58         elog "Please add users to the 'gamestat' group, so they can run Moria:"
59         elog "  usermod -aG gamestat <user>"
60         elog
61 }