summaryrefslogtreecommitdiff
blob: d1cf69ebfa482f075e0d535ff342ccd256a3a4da (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-fps/ut2003-bonuspack-epic/ut2003-bonuspack-epic-1.ebuild,v 1.13 2006/04/14 11:59:06 wolf31o2 Exp $

inherit games

IUSE=""
DESCRIPTION="Epic Bonus Pack for UT2003"
HOMEPAGE="http://www.unrealtournament2003.com/"
SRC_URI="ftp://ftp.infogrames.net/misc/ut2003/UT2003-epicbonuspackone.exe
	http://fragzone.medialt.ru/files/Unreal%20Tournament/Patches/UT2003-epicbonuspackone.exe
	http://www.edgefiles.com/download/dl3.edgefiles.com/unrealgaming.com/www/ut2003/bonuspack/UT2003-epicbonuspackone.exe"

LICENSE="ut2003"
SLOT="1"
KEYWORDS="x86"
RESTRICT="mirror strip"

DEPEND="app-arch/unzip"
RDEPEND="games-fps/ut2003"

S=${WORKDIR}/UT2003-BonusPack

dir=${GAMES_PREFIX_OPT}/ut2003
Ddir=${D}/${dir}

src_unpack() {
	unzip ${DISTDIR}/${A} || die "unpacking"
	# This is done since the files are the same
	rm ${S}/Textures/LastManStanding.utx
}

src_install() {
	dodir ${dir}
	insinto ${dir}/Help
	newins ${S}/Help/BonusPackReadme.txt EpicBonusPack.README || die "README"

	exeinto ${dir}
	doexe ${FILESDIR}/epic-installer
	dodir ${dir}/System

	cp -r ${S}/{Maps,Sounds,StaticMeshes,Textures} ${Ddir} \
		|| die "Copying Maps/Sounds/Textures"
	cp ${S}/System/{*.{det,est,frt,int,itt,kot,tmt,u},User.ini} ${Ddir}/System \
		|| die "Copying System files"
	cp -v ${S}/System/Manifest.ini ${Ddir}/System/Manifest.ini.epic \
		|| die "Copying Manifest"

	prepgamesdirs
}

pkg_postinst() {
	games_pkg_postinst
	einfo "You will need to run:"
	einfo "emerge --config =${CATEGORY}/${PF}"
	einfo "to make the necessary changes to the system .ini files."
	echo
	einfo "Each user whom has already played the game will need to run:"
	einfo " ${dir}/epic-installer"
	echo
	einfo "to update their configuration files in their home directory."
	echo
}

pkg_config() {
	cd ${dir}/System
	cp Manifest.ini Manifest.ini.pre-epic
	cp ${dir}/System/Manifest.ini.epic Manifest.ini

	cp Default.ini Default.ini.pre-epic
	cat >> Default.ini <<EOT

[Xinterface.Tab_AudioSettings]
BonusPackInfo[1]=(PackageName="AnnouncerEvil.uax",Description="Evil")
BonusPackInfo[2]=(PackageName="AnnouncerFemale.uax",Description="Female")
BonusPackInfo[3]=(PackageName="AnnouncerSexy.uax",Description="Aroused")

EOT

	ed Default.ini >/dev/null 2>&1 <<EOT
/\[xInterface.ExtendedConsole\]
a
MusicManagerClassName=OGGPlayer.UT2OGGMenu
.
w
q
EOT

	ed Default.ini >/dev/null 2>&1 <<EOT
$
?EditPackages?
a
EditPackages=BonusPack
EditPackages=SkaarjPack
EditPackages=SkaarjPack_rc
.
w
q
EOT

	ed Default.ini >/dev/null 2>&1 <<EOT
$
?ServerPackages?
a
ServerPackages=BonusPack
ServerPackages=SkaarjPack
ServerPackages=SkaarjPack_rc
.
w
q
EOT

	cp DefUser.ini DefUser.ini.pre-epic
	sed -i 's/^F11=.*$/F11=MusicMenu/g' DefUser.ini
	chown games:games ${dir}/System/*.ini
}