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