summaryrefslogtreecommitdiff
path: root/games-rpg/comi/comi-1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-rpg/comi/comi-1.ebuild
reinit the tree, so we can have metadata
Diffstat (limited to 'games-rpg/comi/comi-1.ebuild')
-rw-r--r--games-rpg/comi/comi-1.ebuild67
1 files changed, 67 insertions, 0 deletions
diff --git a/games-rpg/comi/comi-1.ebuild b/games-rpg/comi/comi-1.ebuild
new file mode 100644
index 000000000000..91a25419df7f
--- /dev/null
+++ b/games-rpg/comi/comi-1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cdrom estack eutils xdg
+
+DESCRIPTION="The Curse of Monkey Island, the third game in the series"
+HOMEPAGE="https://en.wikipedia.org/wiki/The_Curse_of_Monkey_Island"
+SRC_URI="https://dev.gentoo.org/~chewi/distfiles/${PN}.jpg"
+LICENSE="${PN}"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+RESTRICT="bindist"
+
+RDEPEND=">=games-engines/scummvm-0.4.0"
+
+S="${WORKDIR}"
+
+dotar() {
+ cd "${CDROM_ABSMATCH%/*}" || die
+ eshopts_push -s nocaseglob nullglob
+
+ # Lowercase
+ # Documentation into doc
+ # Remainder into data
+ # Avoid copying files twice
+
+ tar c \
+ --mode=u+w \
+ --ignore-case \
+ --xform='s:^[^a-z]+$:\L\0:x' \
+ --xform='s:.*:data/\0:x' \
+ --xform='s:.*\.(pdf|txt)$:doc/\0:x' \
+ --xform='s:^doc/data/:doc/:x' \
+ --exclude="$(use doc || echo '*.pdf')" \
+ --exclude-from=<(find "${WORKDIR}"/data -type f -printf "%P\n" 2>/dev/null) \
+ *.{txt,pdf} *.la[0-9] resource*/ \
+ | tar x -C "${WORKDIR}"
+
+ assert "tar failed"
+ eshopts_pop
+
+ # Don't prevent CD ejection.
+ cd "${WORKDIR}" || die
+}
+
+src_unpack() {
+ cdrom_get_cds comi.la1 comi.la2
+ dotar
+
+ cdrom_load_next_cd
+ dotar
+}
+
+src_install() {
+ insinto /usr/share/games/scummvm/games/comi
+ doins -r data/*
+
+ # Documentation may be missing.
+ [[ -d doc ]] && dodoc doc/*
+
+ doicon "${DISTDIR}"/${PN}.jpg
+ make_wrapper ${PN} "scummvm comi"
+ make_desktop_entry ${PN} "The Curse of Monkey Island" ${PN}.jpg
+}