Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/descent2-vertigo/
Date: Thu, 27 Apr 2017 21:42:19
Message-Id: 1493329287.b0d7ed309226566849a1817f6cffcb752c09c825.chewi@gentoo
1 commit: b0d7ed309226566849a1817f6cffcb752c09c825
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 26 22:31:40 2017 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 27 21:41:27 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0d7ed30
7
8 games-action/descent2-vertigo: New package, closes bug #369399
9
10 Package-Manager: Portage-2.3.5, Repoman-2.3.2
11
12 .../descent2-vertigo/descent2-vertigo-1.0.ebuild | 57 ++++++++++++++++++++++
13 games-action/descent2-vertigo/metadata.xml | 8 +++
14 2 files changed, 65 insertions(+)
15
16 diff --git a/games-action/descent2-vertigo/descent2-vertigo-1.0.ebuild b/games-action/descent2-vertigo/descent2-vertigo-1.0.ebuild
17 new file mode 100644
18 index 00000000000..d49ee60b99d
19 --- /dev/null
20 +++ b/games-action/descent2-vertigo/descent2-vertigo-1.0.ebuild
21 @@ -0,0 +1,57 @@
22 +# Copyright 1999-2017 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +inherit cdrom eutils
28 +
29 +DESCRIPTION="Data files for Descent 2: The Vertigo Series"
30 +HOMEPAGE="http://www.interplay.com/games/descent.php"
31 +LICENSE="descent-data"
32 +SLOT="0"
33 +KEYWORDS="~amd64 ~x86"
34 +IUSE="videos"
35 +RESTRICT="bindist"
36 +
37 +S="${WORKDIR}"
38 +
39 +src_unpack() {
40 + cdrom_get_cds vertigo/d2x.hog:hoard.ham
41 +
42 + case ${CDROM_SET} in
43 + 0) einfo "Found Descent 2 Vertigo Series CD" ;;
44 + 1) einfo "Found Descent 2 Vertigo Series installation" ;;
45 + esac
46 +
47 + cd "${CDROM_ABSMATCH%/*}" || die
48 + eshopts_push -s globstar nocaseglob nullglob
49 +
50 + # Strip directories
51 + # Lowercase
52 + # *.{hog,mn2} into data/missions
53 + # Remainder into data
54 +
55 + tar c \
56 + --mode=u+w \
57 + --ignore-case \
58 + --xform='s:.*/::xg' \
59 + --xform='s:.*:\L\0:x' \
60 + --xform='s:.*\.(hog|mn2)$:data/missions/\0:x' \
61 + --xform='s:^[^/]+$:data/\0:x' \
62 + --exclude="$(use videos || echo '*.mvl')" \
63 + **/{hoard.ham,d2x-h.mvl,{d2x,panic}.{hog,mn2}}* \
64 + | tar x -C "${WORKDIR}"
65 +
66 + assert "tar failed"
67 + eshopts_pop
68 +}
69 +
70 +src_install() {
71 + insinto /usr/share/games/d2x
72 + doins -r data/*
73 +}
74 +
75 +pkg_postinst() {
76 + elog "A client is needed to run the game, e.g. games-action/dxx-rebirth."
77 + echo
78 +}
79
80 diff --git a/games-action/descent2-vertigo/metadata.xml b/games-action/descent2-vertigo/metadata.xml
81 new file mode 100644
82 index 00000000000..26079e608be
83 --- /dev/null
84 +++ b/games-action/descent2-vertigo/metadata.xml
85 @@ -0,0 +1,8 @@
86 +<?xml version="1.0" encoding="UTF-8"?>
87 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
88 +<pkgmetadata>
89 + <maintainer type="project">
90 + <email>games@g.o</email>
91 + <name>Gentoo Games Project</name>
92 + </maintainer>
93 +</pkgmetadata>