/[gentoo-x86]/games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild
Gentoo

Contents of /games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.18 - (show annotations) (download)
Sun Feb 5 06:12:08 2012 UTC (3 years, 5 months ago) by vapier
Branch: MAIN
Changes since 1.17: +2 -2 lines
Move to new unpacker eclass for unpack_makeself.

(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild,v 1.17 2012/01/16 19:31:33 ulm Exp $
4
5 inherit eutils unpacker cdrom games
6
7 DESCRIPTION="Futuristic FPS (Game Of The Year edition)"
8 HOMEPAGE="http://www.unrealtournament.com/"
9 SRC_URI="ftp://ftp.lokigames.com/pub/beta/ut/ut-install-436-GOTY.run
10 http://utpg.org/patches/UTPGPatch${PV}.tar.bz2"
11
12 LICENSE="as-is"
13 SLOT="0"
14 KEYWORDS="~amd64 x86"
15 IUSE="3dfx S3TC nls opengl"
16
17 RDEPEND="!amd64? (
18 x11-libs/libXext
19 x11-libs/libX11
20 x11-libs/libXau
21 x11-libs/libXdmcp
22 =media-libs/libsdl-1.2*
23 opengl? ( virtual/opengl ) )
24 amd64? ( app-emulation/emul-linux-x86-sdl
25 app-emulation/emul-linux-x86-baselibs
26 app-emulation/emul-linux-x86-xlibs )"
27 DEPEND="${RDEPEND}
28 !games-fps/unreal-tournament
29 app-arch/unzip"
30
31 S=${WORKDIR}
32
33 src_unpack() {
34 cdrom_get_cds System/ Help/chaosut
35 unpack_makeself ut-install-436-GOTY.run
36 mkdir UTPG && cd UTPG
37 unpack UTPGPatch${PV}.tar.bz2
38 rm checkfiles.sh patch.md5
39 }
40
41 src_install() {
42 local dir=${GAMES_PREFIX_OPT}/${PN/-goty/}
43 local Ddir=${D}/${dir}
44 dodir "${dir}"
45
46 ###########
47 ### PRE ###
48 # System
49 if use 3dfx ; then
50 tar -zxf Glide.ini.tar.gz -C "${Ddir}" || die "install Glide ini"
51 else
52 tar -zxf OpenGL.ini.tar.gz -C "${Ddir}" || die "install OpenGL ini"
53 fi
54 tar -zxf data.tar.gz -C "${Ddir}" || die "extract System data"
55
56 # the most important things, ucc & ut :)
57 exeinto "${dir}"
58 doexe bin/x86/{ucc,ut} || die "install ucc/ut"
59 dosed "s:\`FindPath \$0\`:${dir}:" "${dir}"/ucc
60
61 # export some symlinks so ppl can run
62 dodir "${GAMES_BINDIR}"
63 dosym "${dir}"/ucc "${GAMES_BINDIR}"/ucc
64 dosym "${dir}"/ut "${GAMES_BINDIR}"/ut
65 ### PRE ###
66 ###########
67
68 ###########
69 ### CD1 ###
70 # Help, Logs, Music, Sounds, Textures, Web
71 cp -rf "${CDROM_ROOT}"/{Help,Logs,Music,Textures,Web} "${Ddir}"/ || die "copy Help, Logs, Music, Textures, Web CD1"
72 dodir "${dir}"/Sounds
73 if use nls ; then
74 cp -rf "${CDROM_ROOT}"/Sounds/* "${Ddir}"/Sounds/ || die "copy Sounds CD1"
75 else
76 cp -rf "${CDROM_ROOT}"/Sounds/*.uax "${Ddir}"/Sounds/ || die "copy Sounds CD1"
77 fi
78
79 # System
80 dodir "${dir}"/System
81 if use nls ; then
82 cp "${CDROM_ROOT}"/System/*.{est,frt,itt,int,u} "${Ddir}"/System/ || die "copy System data CD1"
83 else
84 cp "${CDROM_ROOT}"/System/*.{int,u} "${Ddir}"/System/ || die "copy System data CD1"
85 fi
86
87 # now we uncompress the maps
88 einfo "Uncompressing CD1 Maps ... this may take some time"
89 dodir "${dir}"/Maps
90 cd "${Ddir}"
91 export HOME=${T}
92 export UT_DATA_PATH="${Ddir}"/System
93 for f in `find "${CDROM_ROOT}"/Maps/ -name '*.uz' -printf '%f '` ; do
94 ./ucc decompress "${CDROM_ROOT}"/Maps/${f} -nohomedir || die "uncompressing map CD1 ${f}"
95 mv System/${f:0:${#f}-3} Maps/ || die "copy map CD1 ${f}"
96 done
97 ### CD1 ###
98 ###########
99
100 ### Have user switch cds if need be ###
101 cdrom_load_next_cd
102
103 ###########
104 ### CD2 ###
105 # Help, Sounds
106 cp -rf "${CDROM_ROOT}"/{Help,Sounds} "${Ddir}"/ || die "copy Help, Sounds CD2"
107
108 # S3TC Textures
109 if use S3TC ; then
110 cp -rf "${CDROM_ROOT}"/Textures "${Ddir}"/ || die "copy S3TC Textures CD2"
111 else
112 cp -rf "${CDROM_ROOT}"/Textures/{JezzTex,Jezztex2,SnowDog,chaostex{,2}}.utx "${Ddir}"/Textures/ || die "copy Textures CD2"
113 fi
114
115 # System
116 cp -rf "${CDROM_ROOT}"/System/*.{u,int} "${Ddir}"/System/ || die "copy System CD2"
117
118 # now we uncompress the maps
119 einfo "Uncompressing CD2 Maps ... this may take some time"
120 dodir "${dir}"/Maps
121 cd "${Ddir}"
122 export HOME=${T}
123 export UT_DATA_PATH="${Ddir}"/System
124 for f in `find "${CDROM_ROOT}"/maps/ -name '*.uz' -printf '%f '` ; do
125 ./ucc decompress "${CDROM_ROOT}"/maps/${f} -nohomedir || die "uncompressing map CD2 ${f}"
126 mv System/${f:0:${#f}-3} Maps/ || die "copy map CD2 ${f}"
127 done
128 ### CD2 ###
129 ###########
130
131 ###########
132 ### END ###
133 cd "${S}"
134
135 # Textures
136 tar -zxf Credits.tar.gz -C "${Ddir}" || die "extract credits texture"
137 # NetGamesUSA.com
138 tar -zxf NetGamesUSA.com.tar.gz -C "${Ddir}"/ || die "extract NetGamesUSA.com"
139
140 # first apply any patch remaints loki has for us
141 cd setup.data
142 cp patch.dat{,.orig} || die "cp failed"
143 sed -e 's:sh uz-maps.sh:echo:' patch.dat.orig > patch.dat || die "sed failed"
144 ./bin/Linux/x86/loki_patch patch.dat "${Ddir}" >& /dev/null
145 cd "${S}"
146
147 # finally, unleash the UTPG patch
148 cp -rf UTPG/* "${Ddir}"/ || die "cp failed"
149 # fix a small bug until next official release
150 dosed "/^LoadClassMismatch/s:%s.%s:%s:" "${dir}"/System/Core.int
151
152 # install a few random files
153 insinto "${dir}"
154 doins README icon.{bmp,xpm} || die "installing random files"
155
156 # now, since these files are coming off a cd, the times/sizes/md5sums wont
157 # be different ... that means portage will try to unmerge some files (!)
158 # we run touch on ${D} so as to make sure portage doesnt do any such thing
159 find "${Ddir}" -exec touch '{}' \;
160 ### END ###
161 ###########
162
163 prepgamesdirs
164 }
165
166 pkg_postinst() {
167 games_pkg_postinst
168 elog "You might want to install the bonus packs too."
169 elog "Many servers on the internet use them, and the"
170 elog "majority of players do too."
171 elog
172 elog "Just run: emerge unreal-tournament-bonuspacks"
173 }

  ViewVC Help
Powered by ViewVC 1.1.20