# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit games eutils

SLOT="1"
MY_PN="${PN}"

DESCRIPTION="Prince of Persia ${SLOT} (DOS binary)"
HOMEPAGE="http://www.popuw.com/"
SRC_URI="http://www.popuw.com/prince13.rar"
RESTRICT="mirror"

LICENSE="as-is"
KEYWORDS="x86"
IUSE=""

RDEPEND="games-emulation/dosbox"

S=${WORKDIR}
MY_BASE="${GAMES_PREFIX_OPT}/${PN}/${SLOT}"

src_compile() {
	cat <<EOF > ${T}/${MY_PN}
#!/bin/bash
exec ${GAMES_BINDIR}/dosbox ${MY_BASE}/PRINCE.EXE
EOF
}

src_install() {
	insinto ${MY_BASE}
	doins *
	prepgamesdirs ${MY_BASE}
	dogamesbin ${T}/${MY_PN}
	make_desktop_entry ${MY_PN} "Prince of Persia ${SLOT}"
}
