]> Pileus Git - ~andy/sunrise/blob - games-fps/unreal-tournament-operationnapali/unreal-tournament-operationnapali-1.30.ebuild
sunrise/ app-portage/elog-list/elog-list-0.0.6.ebuild: Update headers for 2010
[~andy/sunrise] / games-fps / unreal-tournament-operationnapali / unreal-tournament-operationnapali-1.30.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit versionator games
6
7 MY_PV=$(delete_all_version_separators)
8
9 DESCRIPTION="Unreal-themed single-player campaign"
10 HOMEPAGE="http://www.planetunreal.com/teamvortex/help/"
11 SRC_URI="ftp://ftp.planetmirror.com/pub/moddb/2005/07/1263-ONP${MY_PV}_Umod.zip"
12
13 LICENSE="as-is"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE=""
17
18 RDEPEND="|| (
19                 >=games-fps/unreal-tournament-436
20                 >=games-fps/unreal-tournament-goty-436 )"
21 DEPEND="games-util/umodpack
22         app-arch/unzip"
23
24 S=${WORKDIR}
25 dir=${GAMES_PREFIX_OPT}/unreal-tournament
26 docdir=op-napali
27
28 src_unpack() {
29         local f lcn n
30
31         unpack ${A}
32         for f in *.umod ; do
33                 umod -x "${f}" || die "umod ${f} failed"
34         done
35         rm *.umod
36
37         cd "${S}"
38         unpack ./*.zip
39         rm *.{txt,zip}
40
41         mv -f *.unr Maps
42         mv -f *.u System
43
44         # Fix filenames in HTML
45         sed -i data/docs/*.html \
46                 -e "s:\.JPG:\.jpg:" \
47                 -e "s:\.PNG:\.png:" \
48                 -e "s:TVshortie:tvshortie:" \
49                 || die "sed docs failed"
50
51         sed -i *.html \
52                 -e "s:data/docs:${docdir}/docs:" \
53                 || die "sed help doc failed"
54
55         for n in Skaarj Nali Mercenary Krall Brute ; do
56                 lcn=$(echo "${n}" | tr [:upper:] [:lower:])
57                 sed -i data/docs/*.html \
58                         -e "s:${n}\.jpg:${lcn}\.jpg:" \
59                         || die "sed ${n} failed"
60         done
61
62         # Remove Gamespy ads
63         sed -i data/docs/faq.html \
64                 -e '9,12d' \
65                 || die "sed faq failed"
66
67         mv "Operation NaPali Help Doc.html" "${docdir}.html"
68         mv data "${docdir}"
69 }
70
71 src_install() {
72         insinto "${dir}"
73         doins -r * || die "doins -r failed"
74
75         prepgamesdirs
76 }
77
78 pkg_postinst() {
79         games_pkg_postinst
80
81         einfo "For instructions and story, read:"
82         einfo "${dir}/${docdir}.html"
83         echo
84 }