summaryrefslogtreecommitdiff
blob: 00fd2d5a53173f8ee07af4005e5d7af5303613e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit games

DESCRIPTION="A 3D Fantasy MMORPG"
HOMEPAGE="http://planeshift.it"
SRC_URI="x86? ( mirror://planeshift/PlaneShift-v${PV}-x86.bin )
	amd64? ( mirror://planeshift/PlaneShift-v${PV}-x64.bin )"

LICENSE="GPL-3 PlaneShift"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RESTRICT="strip"

src_unpack() {
	cp -L "${DISTDIR}/${A}" "${WORKDIR}" || die "Copy ${A} to ${WORKDIR}"
	chmod +x "${WORKDIR}/${A}" || die "chmod die"
}

src_install() {
	"${WORKDIR}"/${A} \
		--mode unattended \
		--perms yes \
		--usergroup games \
		--prefix "${D}/${GAMES_PREFIX_OPT}" || die "Installer of Planeshift die"

	rm "${D}/${GAMES_PREFIX_OPT}"/PlaneShift/psupdater
	rm "${D}/${GAMES_PREFIX_OPT}"/PlaneShift/psupdater.bin
	rm "${D}/${GAMES_PREFIX_OPT}"/PlaneShift/uninstall

	games_make_wrapper psclient "${GAMES_PREFIX_OPT}/PlaneShift/psclient"
	make_desktop_entry psclient "Play PlaneShift"

	games_make_wrapper pssetup "${GAMES_PREFIX_OPT}/PlaneShift/pssetup"
	make_desktop_entry pssetup "PlaneShift setup"
}