Merge remote-tracking branch 'github/pr/135'
[gentoo.git] / games-strategy / knights-demo / knights-demo-1.32-r1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit eutils unpacker games
7
8 DESCRIPTION="Anglo-Saxon medieval army battles and resource management"
9 HOMEPAGE="http://www.linuxgamepublishing.com/info.php?id=knights"
10 # Unversioned upstream filename
11 SRC_URI="mirror://gentoo/${P}.run"
12
13 LICENSE="knights-demo"
14 SLOT="0"
15 KEYWORDS="x86"
16 IUSE=""
17 RESTRICT="strip"
18
19 RDEPEND="sys-libs/glibc
20         >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
21         >=x11-libs/libXau-1.0.7-r1[abi_x86_32(-)]
22         >=x11-libs/libXdmcp-1.1.1-r1[abi_x86_32(-)]
23         >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
24         >=x11-libs/libXi-1.7.2[abi_x86_32(-)]"
25
26 S=${WORKDIR}
27
28 src_unpack() {
29         unpack_makeself ${P}.run
30         mv -f data{,-temp}
31         unpack ./data-temp/data.tar.gz
32         rm -rf data-temp lgp_* setup*
33 }
34
35 src_install() {
36         local dir=${GAMES_PREFIX_OPT}/${PN}
37
38         exeinto "${dir}"
39         doexe bin/Linux/x86/${PN}{,.dynamic}
40
41         insinto "${dir}"
42         doins -r data
43         doins EULA icon.xpm README{,.licenses}
44
45         # We don't support the dynamic version, even though we install it.
46         games_make_wrapper ${PN} ./${PN} "${dir}" "${dir}"
47         newicon icon.xpm ${PN}.xpm
48         make_desktop_entry ${PN} "Knights and Merchants (Demo)" ${PN}
49         prepgamesdirs
50 }