games-fps/eduke32: fix timidity deps
[gentoo.git] / games-fps / quake3-data / quake3-data-1.32b.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 CDROM_OPTIONAL="yes"
6 inherit eutils unpacker cdrom games
7
8 DESCRIPTION="Quake III Arena - data portion"
9 HOMEPAGE="http://icculus.org/quake3/"
10 SRC_URI="mirror://idsoftware/quake3/linux/linuxq3apoint-${PV}-3.x86.run"
11
12 LICENSE="Q3AEULA"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~x86"
15 IUSE=""
16 RESTRICT="bindist"
17
18 S=${WORKDIR}
19 dir=${GAMES_DATADIR}/quake3
20
21 src_unpack() {
22         use cdinstall && cdrom_get_cds baseq3/pak0.pk3:Quake3/baseq3/pak0.pk3
23         unpack_makeself
24 }
25
26 src_install() {
27         ebegin "Copying files from linux client ..."
28         insinto "${GAMES_DATADIR}"/quake3/baseq3
29         doins baseq3/*.pk3
30         eend 0
31
32         if use cdinstall ; then
33                 einfo "Copying files from CD ..."
34                 newins "${CDROM_ABSMATCH}" pak0.pk3
35                 eend 0
36         fi
37
38         find "${D}" -exec touch '{}' \;
39
40         prepgamesdirs
41 }
42
43 pkg_postinst() {
44         games_pkg_postinst
45         if ! use cdinstall ; then
46                 echo
47                 elog "You need to copy pak0.pk3 from your Quake3 CD into:"
48                 elog " ${dir}/baseq3."
49                 elog "Or if you have a Windows installation of Q3 make a symlink to save space."
50                 elog
51                 elog "Or, re-emerge quake3-data with USE=cdinstall."
52                 echo
53         fi
54 }