From 4cd9f52724665ccd520539c7e88f8d19b7ce4868 Mon Sep 17 00:00:00 2001 From: eroen Date: Fri, 26 Dec 2014 14:33:06 +0100 Subject: simutrans-pak64 - live ebuild --- games-simulation/simutrans-pak64/metadata.xml | 6 ++ .../simutrans-pak64/simutrans-pak64-9999.ebuild | 81 ++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 games-simulation/simutrans-pak64/metadata.xml create mode 100644 games-simulation/simutrans-pak64/simutrans-pak64-9999.ebuild (limited to 'games-simulation') diff --git a/games-simulation/simutrans-pak64/metadata.xml b/games-simulation/simutrans-pak64/metadata.xml new file mode 100644 index 00000000..2577434a --- /dev/null +++ b/games-simulation/simutrans-pak64/metadata.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/games-simulation/simutrans-pak64/simutrans-pak64-9999.ebuild b/games-simulation/simutrans-pak64/simutrans-pak64-9999.ebuild new file mode 100644 index 00000000..2f3418fd --- /dev/null +++ b/games-simulation/simutrans-pak64/simutrans-pak64-9999.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +LIVE="" +[[ ${PV} = 9999* ]] && LIVE=yes +MY_PN=${PN##*-} +if [[ -n ${LIVE} ]]; then + inherit eutils subversion games + ESVN_REPO_URI="http://svn.code.sf.net/p/simutrans/code/${MY_PN}" +else + inherit eutils games + MY_PV=${PV##0.} + MY_PV=${MY_PV//./-} + SRC_URI="mirror://sourceforge/simutrans/simupak64-${MY_PV}.zip" + KEYWORDS="-* ~amd64 ~x86" +fi +DESCRIPTION="Official Simutrans pakset" +HOMEPAGE="http://www.simutrans.com/ + http://sourceforge.net/p/simutrans/code/HEAD/tree/pak64/" + +LICENSE="Artistic" +SLOT="0" +IUSE="" + +RDEPEND=" + >=games-simulation/simutrans-0.120 + " +if [[ -n ${LIVE} ]]; then + DEPEND="|| ( + games-util/makeobj + games-simulation/simutrans[makeobj(-)] + )" +else + DEPEND="app-arch/unzip" +fi + +S=${WORKDIR} + +src_unpack() { + if [[ -n ${LIVE} ]]; then + subversion_src_unpack + else + default + fi +} + +src_prepare() { + if [[ -n ${LIVE} ]]; then + # we don't need to generate the zip and tarballs + echo '.PHONY: gentoo' >> Makefile + echo 'gentoo: copy $(DIRS)' >> Makefile + fi +} + +src_compile() { + if [[ -n ${LIVE} ]]; then + mkdir build + MAKEOBJ=$(which makeobj) \ + emake -j1 gentoo + fi +} + +src_install() { + insinto "${GAMES_DATADIR}"/${PN} + doins -r simutrans/pak + + games_make_wrapper ${PN} "simutrans -objects ../${PN}/pak" + make_desktop_entry ${PN} "Simutrans (${MY_PN})" simutrans.ico + + prepgamesdirs +} + +pkg_postinst() { + games_pkg_postinst + elog + elog "To run Simutrans with ${MY_PN} pakset, execute:" + elog " ${PN}" +} -- cgit v1.2.1