commit: b0d7ed309226566849a1817f6cffcb752c09c825 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> AuthorDate: Wed Apr 26 22:31:40 2017 +0000 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> CommitDate: Thu Apr 27 21:41:27 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0d7ed30
games-action/descent2-vertigo: New package, closes bug #369399 Package-Manager: Portage-2.3.5, Repoman-2.3.2 .../descent2-vertigo/descent2-vertigo-1.0.ebuild | 57 ++++++++++++++++++++++ games-action/descent2-vertigo/metadata.xml | 8 +++ 2 files changed, 65 insertions(+) diff --git a/games-action/descent2-vertigo/descent2-vertigo-1.0.ebuild b/games-action/descent2-vertigo/descent2-vertigo-1.0.ebuild new file mode 100644 index 00000000000..d49ee60b99d --- /dev/null +++ b/games-action/descent2-vertigo/descent2-vertigo-1.0.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cdrom eutils + +DESCRIPTION="Data files for Descent 2: The Vertigo Series" +HOMEPAGE="http://www.interplay.com/games/descent.php" +LICENSE="descent-data" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="videos" +RESTRICT="bindist" + +S="${WORKDIR}" + +src_unpack() { + cdrom_get_cds vertigo/d2x.hog:hoard.ham + + case ${CDROM_SET} in + 0) einfo "Found Descent 2 Vertigo Series CD" ;; + 1) einfo "Found Descent 2 Vertigo Series installation" ;; + esac + + cd "${CDROM_ABSMATCH%/*}" || die + eshopts_push -s globstar nocaseglob nullglob + + # Strip directories + # Lowercase + # *.{hog,mn2} into data/missions + # Remainder into data + + tar c \ + --mode=u+w \ + --ignore-case \ + --xform='s:.*/::xg' \ + --xform='s:.*:\L\0:x' \ + --xform='s:.*\.(hog|mn2)$:data/missions/\0:x' \ + --xform='s:^[^/]+$:data/\0:x' \ + --exclude="$(use videos || echo '*.mvl')" \ + **/{hoard.ham,d2x-h.mvl,{d2x,panic}.{hog,mn2}}* \ + | tar x -C "${WORKDIR}" + + assert "tar failed" + eshopts_pop +} + +src_install() { + insinto /usr/share/games/d2x + doins -r data/* +} + +pkg_postinst() { + elog "A client is needed to run the game, e.g. games-action/dxx-rebirth." + echo +} diff --git a/games-action/descent2-vertigo/metadata.xml b/games-action/descent2-vertigo/metadata.xml new file mode 100644 index 00000000000..26079e608be --- /dev/null +++ b/games-action/descent2-vertigo/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>ga...@gentoo.org</email> + <name>Gentoo Games Project</name> + </maintainer> +</pkgmetadata>