# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit eutils games MY_PN="Cogs" DESCRIPTION="An award-winning puzzle game where players build an incredible variety of machines from sliding tiles" HOMEPAGE="http://www.cogsgame.com/" HIBPAGE="http://www.humblebundle.com" SRC_URI="${PN}_${PV}_all.tar.gz" RESTRICT="fetch" LICENSE="" SLOT="0" KEYWORDS="amd64 ~x86" IUSE="" RDEPEND="media-libs/libsdl[audio,joystick,video] media-libs/openal" S="${WORKDIR}/${PN}" GAMEDIR="${GAMES_PREFIX_OPT}/${PN}" pkg_nofetch() { einfo "Please buy and download '${SRC_URI}'" einfo "and move/link it to '${DISTDIR}'" } src_install() { insinto "${GAMEDIR}" doins -r "data" || die "doins failed" exeinto "${GAMEDIR}" #doexe "${MY_PN}" || die "doexe '${MY_PN}' failed" if use amd64; then newexe "${MY_PN}-amd64" "${PN}" || die "newexe '${MY_PN}-amd64' failed" else newexe "${MY_PN}-x86" "${PN}" || die "newexe '${MY_PN}-x86' failed" fi # Install shortcuts anc icon games_make_wrapper "${PN}" "./${PN}" "${GAMEDIR}" \ || die "games_make_wrapper failed" doicon "${PN}.png" || die "doicon failed" make_desktop_entry "${PN}" "${MY_PN}" "/usr/share/pixmaps/${PN}.png" \ || die "make_desktop_entry failed" # Install documentation dodoc README-linux.txt || die "dodoc failed" # Setting permissions prepgamesdirs } pkg_postinst() { echo "" games_pkg_postinst einfo "Please report any bugs here:" einfo "http://bugzilla.icculus.org/" echo einfo "An email list for discussion \(not bug reports!\) is available here:" einfo "http://icculus.org/mailman/listinfo/cogs" echo einfo "${MY_PN} savegames are stored in the" einfo "\"\${HOME}/.local/share/${MY_PN}\" dir." echo }