diff options
Diffstat (limited to 'games-strategy/gratitious-space-battles/gratitious-space-battles-1.56.0.ebuild')
-rwxr-xr-x | games-strategy/gratitious-space-battles/gratitious-space-battles-1.56.0.ebuild | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/games-strategy/gratitious-space-battles/gratitious-space-battles-1.56.0.ebuild b/games-strategy/gratitious-space-battles/gratitious-space-battles-1.56.0.ebuild new file mode 100755 index 0000000..dd0f1c8 --- /dev/null +++ b/games-strategy/gratitious-space-battles/gratitious-space-battles-1.56.0.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=2 +inherit eutils games + +MY_PN="GSB" +MY_VER="1324679796" +MY_ARCH="${ARCH/amd64/x86_64}" + +DESCRIPTION="a space battle strategy game focusing on ship-to-ship combat" +HOMEPAGE="http://www.positech.co.uk/gratuitousspacebattles/" +SRC_URI="gsb${MY_VER}.tar.gz" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="-* amd64 ~x86" +IUSE="doc" +RESTRICT="fetch" + +RDEPEND="app-arch/bzip2 + app-arch/xz-utils + dev-libs/expat + media-libs/fontconfig + media-libs/jpeg:62 + media-libs/libpng:1.2 + media-libs/libvorbis + media-libs/openal + media-libs/sdl-image + media-libs/tiff + net-dns/libidn + virtual/opengl + x11-libs/libXext + x11-libs/libXft + x11-libs/libxcb" +DEPEND="" + +S=${WORKDIR}/${MY_PN} + +GAMEDIR=${GAMES_PREFIX_OPT}/${PN} + +pkg_nofetch() { + elog "Please purchase and download '${SRC_URI}'" + elog "then copy to: '${DISTDIR}'" + echo +} + +src_install() { + insinto "${GAMEDIR}" + exeinto "${GAMEDIR}" + + # install game files + doins -r data || die "install data failed" + newexe ${MY_PN}.bin.${MY_ARCH} ${MY_PN}.bin || die "install bin failed" + + # install necessary budled libraries + [ "$ARCH" == "amd64" ] && LIBDIR=lib64 || LIBDIR=lib + exeinto "${GAMEDIR}/${LIBDIR}" + # curl - this version is older than Gentoo stable + # sdl_image - system version linked against newer PNG/JPEG; will crash + doexe ${LIBDIR}/{libcurl.so.3,libSDL_image-1.2.so.0} \ + || die "install libs failed" + + # install documentation + dodoc README.linux || die "install required doc failed" + if use doc; then + dodoc GSBManual.pdf || die "install optional doc failed" + fi + + # install shortcuts + newicon ${MY_PN}.png ${PN}.png || die "install icon failed" + games_make_wrapper ${PN} ./${MY_PN}.bin "${GAMEDIR}" \ + || die "install wrapper failed" + make_desktop_entry ${PN} "Gratuitous Space Battles" \ + || die "install shortcut failed" + prepgamesdirs +} + +pkg_postinst() { + einfo "To play the game, run:" + einfo "${PN}" + games_pkg_postinst +} |