/[gentoo-x86]/games-fps/duke3d-data/duke3d-data-1.0-r2.ebuild
Gentoo

Contents of /games-fps/duke3d-data/duke3d-data-1.0-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Sep 22 23:10:20 2014 UTC (3 years, 4 months ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -2 lines
update license for gog USE flag

(Portage version: 2.2.12-r1/cvs/Linux x86_64, signed Manifest commit with key BDEED020)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-fps/duke3d-data/duke3d-data-1.0-r2.ebuild,v 1.1 2014/09/21 11:42:42 hasufell Exp $
4
5 EAPI=5
6
7 CDROM_OPTIONAL="yes"
8 inherit eutils cdrom games
9
10 GOG_FILE="gog_duke_nukem_3d_1.0.0.7.tar.gz"
11 DESCRIPTION="Duke Nukem 3D data files"
12 HOMEPAGE="http://www.3drealms.com/"
13 SRC_URI="gog? ( ${GOG_FILE} )"
14
15 LICENSE="DUKE3D gog? ( GOG-EULA )"
16 SLOT="0"
17 KEYWORDS="~amd64 ~hppa ~ppc ~x86"
18 IUSE="gog"
19 REQUIRED_USE="^^ ( cdinstall gog )"
20 RESTRICT="mirror bindist gog? ( fetch )"
21
22 RDEPEND="|| ( games-fps/eduke32 games-fps/duke3d )"
23
24 S=${WORKDIR}
25
26 pkg_nofetch() {
27 einfo "Please download ${GOG_FILE} from your GOG.com account after buying Duke Nukem 3d"
28 einfo "and put it into ${DISTDIR}."
29 }
30
31 src_unpack() {
32 if use cdinstall ; then
33 export CDROM_NAME_SET=(
34 "Existing Install"
35 "Duke Nukem 3D CD"
36 "Duke Nukem 3D Atomic Edition CD"
37 )
38 cdrom_get_cds duke3d.grp:dvd/dn3dinst/duke3d.grp:atominst/duke3d.grp
39
40 if [[ ${CDROM_SET} -ne 0
41 && ${CDROM_SET} -ne 1
42 && ${CDROM_SET} -ne 2 ]]
43 then
44 die "Error locating data files.";
45 fi
46 else
47 unpack "${GOG_FILE}"
48 cd "Duke Nukem 3D/data" || die
49
50 # convert to lowercase
51 find . -type f \
52 -execdir sh -c 'echo "converting ${1} to lowercase"
53 lower="`echo "${1}" | tr [:upper:] [:lower:]`"
54 [ "${1}" = "${lower}" ] || mv "${1}" "${lower}"' - {} \;
55 fi
56 }
57
58 src_install() {
59 local DATAROOT
60
61 insinto "${GAMES_DATADIR}"/duke3d
62
63 if use cdinstall ; then
64 case ${CDROM_SET} in
65 0) DATAROOT="" ;;
66 1) DATAROOT="dn3dinst/" ;;
67 2) DATAROOT="atominst/" ;;
68 esac
69
70 # avoid double slash
71 doins "${CDROM_ROOT}"/${DATAROOT}{duke3d.grp,duke.rts,game.con,user.con,demo?.dmo,defs.con}
72 else
73 doins "Duke Nukem 3D/data"/{duke3d.grp,duke.rts,game.con,user.con,demo?.dmo,defs.con}
74 fi
75
76 prepgamesdirs
77 }

  ViewVC Help
Powered by ViewVC 1.1.20