# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit eutils games DESCRIPTION="Chocolate Castle is a tricky sliding block puzzle game" HOMEPAGE="http://www.lexaloffle.com/choc.php" SRC_URI="${PN}_${PV}_i386.tar.gz" LICENSE="as-is" SLOT="0" KEYWORDS="amd64 ~x86" IUSE="" RESTRICT="fetch" RDEPEND=" amd64? ( app-emulation/emul-linux-x86-sdl app-emulation/emul-linux-x86-soundlibs ) x86? ( media-libs/libsdl media-libs/alsa-lib )" DEPEND="" S=${WORKDIR}/${PN} GAMEDIR=${GAMES_PREFIX_OPT}/${PN} pkg_nofetch() { echo elog "Please purchase and download '${SRC_URI}'" elog "then copy to: '${DISTDIR}'" echo } src_install() { insinto "${GAMEDIR}" exeinto "${GAMEDIR}" # Install game files doins choc.dat || die "install dat" doexe choc || die "install bin" # install documentation dodoc *.txt || die "install doc" # install shortcuts newicon lexaloffle-choc.png ${PN}.png || die "install icon" games_make_wrapper ${PN} ./choc "${GAMEDIR}" "${GAMEDIR}" \ || die "install shortcuts" make_desktop_entry ${PN} "Chocolate Castle" prepgamesdirs } pkg_postinst() { einfo "To play the game, run:" einfo "${PN}" games_pkg_postinst }