diff options
Diffstat (limited to 'games-simulation/vegastrike-data/vegastrike-data-9999.ebuild')
-rw-r--r-- | games-simulation/vegastrike-data/vegastrike-data-9999.ebuild | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/games-simulation/vegastrike-data/vegastrike-data-9999.ebuild b/games-simulation/vegastrike-data/vegastrike-data-9999.ebuild new file mode 100644 index 0000000..d6751bd --- /dev/null +++ b/games-simulation/vegastrike-data/vegastrike-data-9999.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ +# Derived from bug 65084 + +inherit eutils games +[ "$PV" == "9999" ] && inherit subversion + +ESVN_REPO_URI="https://vegastrike.svn.sourceforge.net/svnroot/vegastrike/trunk" +ESVN_PROJECT="vegastrike" +ESVN_BOOTSTRAP="vegastrike/bootstrap-sh" + +DESCRIPTION="A 3D space simulator that allows you to trade and bounty hunt" +HOMEPAGE="http://vegastrike.sourceforge.net/" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +RDEPEND="" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +pkg_setup() { + games_pkg_setup +} + +src_unpack() { + cd "${S}" + local svn=${ESVN_TOP_DIR} + + if ([ ! -d "${svn}/data" ] && [ ! -d "${svn}/data" ]); then + ESVN_MODULE="data" + ESVN_MODULE_DIR="${ESVN_REPO_URI}/${ESVN_MODULE}" + subversion_fetch $ESVN_MODULE_DIR $ESVN_MODULE || die "Fetching data failed" + fi + + einfo "Copying data to work directory..." + cp -a "${svn}"/{data} "${S}" >&/dev/null + + cd "${S}"/data + # Clean up data dir + esvn_clean "${S}" + find "${S}" -name "*.pyc" -type f -exec rm -f '{}' \; >&/dev/null + + # Sort out directory references + sed -i \ + -e "s!/usr/local/share/doc!/usr/share/doc!" \ + -e "s!/usr/local/share/vegastrike!${GAMES_DATADIR}/vegastrike!" \ + -e "s!/usr/local/bin!${GAMES_BINDIR}!" \ + -e "s!/usr/local/lib/man!/usr/share/man!" \ + "${S}/data/documentation/vegastrike.1" \ + || die "sed data/documentation/vegastrike.1 failed" +} + +src_install() { + doman "${S}"/data/documentation/*.1 + dodoc "${S}"/data/documentation/*.txt + + doicon "${S}/data/vegastrike.xpm" + + dodir "${GAMES_DATADIR}/vegastrike" + cp -r data/ "${D}/${GAMES_DATADIR}/vegastrike/" || die "cp failed (data)" + + prepgamesdirs +} + +pkg_postinst() { + games_pkg_postinst +} |