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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Sun Feb 5 06:12:08 2012 UTC (2 years, 2 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +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-436.ebuild,v 1.14 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-${PV}-GOTY.run
10 ftp://ftp.lokigames.com/pub/patches/ut/IpDrv-${PV}-Linux-08-20-02.zip"
11
12 LICENSE="as-is"
13 SLOT="0"
14 KEYWORDS="x86"
15 IUSE="3dfx S3TC nls opengl"
16
17 DEPEND="!games-fps/unreal-tournament
18 app-arch/unzip"
19 RDEPEND="opengl? ( virtual/opengl )
20 x11-libs/libXext
21 x11-libs/libX11
22 x11-libs/libXau
23 x11-libs/libXdmcp"
24
25 S=${WORKDIR}
26
27 src_unpack() {
28 cdrom_get_cds System/ Help/chaosut
29 unpack_makeself ut-install-${PV}-GOTY.run
30 unpack IpDrv-${PV}-Linux-08-20-02.zip
31 }
32
33 src_install() {
34 local dir=${GAMES_PREFIX_OPT}/${PN/-goty/}
35 local Ddir=${D}/${dir}
36 dodir "${dir}"
37
38 ###########
39 ### PRE ###
40 # System
41 if use 3dfx ; then
42 tar -zxf Glide.ini.tar.gz -C "${Ddir}" || die "install Glide ini"
43 else
44 tar -zxf OpenGL.ini.tar.gz -C "${Ddir}" || die "install OpenGL ini"
45 fi
46 tar -zxf data.tar.gz -C "${Ddir}" || die "extract System data"
47
48 # the most important things, ucc & ut :)
49 exeinto "${dir}"
50 doexe bin/x86/{ucc,ut} || die "install ucc/ut"
51 dosed "s:\`FindPath \$0\`:${dir}:" "${dir}"/ucc
52
53 # export some symlinks so ppl can run
54 dodir "${GAMES_BINDIR}"
55 dosym "${dir}"/ucc "${GAMES_BINDIR}"/ucc
56 dosym "${dir}"/ut "${GAMES_BINDIR}"/ut
57 ### PRE ###
58 ###########
59
60 ###########
61 ### CD1 ###
62 # Help, Logs, Music, Sounds, Textures, Web
63 cp -rf "${CDROM_ROOT}"/{Help,Logs,Music,Textures,Web} "${Ddir}"/ || die "copy Help, Logs, Music, Textures, Web CD1"
64 dodir "${dir}"/Sounds
65 if use nls ; then
66 cp -rf "${CDROM_ROOT}"/Sounds/* "${Ddir}"/Sounds/ || die "copy Sounds CD1"
67 else
68 cp -rf "${CDROM_ROOT}"/Sounds/*.uax "${Ddir}"/Sounds/ || die "copy Sounds CD1"
69 fi
70
71 # System
72 dodir "${dir}"/System
73 if use nls ; then
74 cp "${CDROM_ROOT}"/System/*.{est,frt,itt,int,u} "${Ddir}"/System/ || die "copy System data CD1"
75 else
76 cp "${CDROM_ROOT}"/System/*.{int,u} "${Ddir}"/System/ || die "copy System data CD1"
77 fi
78
79 # now we uncompress the maps
80 einfo "Uncompressing CD1 Maps ... this may take some time"
81 dodir "${dir}"/Maps
82 cd "${Ddir}"
83 export HOME=${T}
84 export UT_DATA_PATH="${Ddir}"/System
85 for f in `find "${CDROM_ROOT}"/Maps/ -name '*.uz' -printf '%f '` ; do
86 ./ucc decompress "${CDROM_ROOT}"/Maps/${f} -nohomedir || die "uncompressing map CD1 ${f}"
87 mv System/${f:0:${#f}-3} Maps/ || die "copy map CD1 ${f}"
88 done
89 ### CD1 ###
90 ###########
91
92 ### Have user switch cds if need be ###
93 cdrom_load_next_cd
94
95 ###########
96 ### CD2 ###
97 # Help, Sounds
98 cp -rf "${CDROM_ROOT}"/{Help,Sounds} "${Ddir}"/ || die "copy Help, Sounds CD2"
99
100 # S3TC Textures
101 if use S3TC ; then
102 cp -rf "${CDROM_ROOT}"/Textures "${Ddir}"/ || die "copy S3TC Textures CD2"
103 else
104 cp -rf "${CDROM_ROOT}"/Textures/{JezzTex,Jezztex2,SnowDog,chaostex{,2}}.utx "${Ddir}"/Textures/ || die "copy Textures CD2"
105 fi
106
107 # System
108 cp -rf "${CDROM_ROOT}"/System/*.{u,int} "${Ddir}"/System/ || die "copy System CD2"
109
110 # now we uncompress the maps
111 einfo "Uncompressing CD2 Maps ... this may take some time"
112 dodir "${dir}"/Maps
113 cd "${Ddir}"
114 export HOME=${T}
115 export UT_DATA_PATH="${Ddir}"/System
116 for f in `find "${CDROM_ROOT}"/maps/ -name '*.uz' -printf '%f '` ; do
117 ./ucc decompress "${CDROM_ROOT}"/maps/${f} -nohomedir || die "uncompressing map CD2 ${f}"
118 mv System/${f:0:${#f}-3} Maps/ || die "copy map CD2 ${f}"
119 done
120 ### CD2 ###
121 ###########
122
123 ###########
124 ### END ###
125 cd "${S}"
126
127 # Textures
128 tar -zxf Credits.tar.gz -C "${Ddir}" || die "extract credits texture"
129 # NetGamesUSA.com
130 tar -zxf NetGamesUSA.com.tar.gz -C "${Ddir}"/ || die "extract NetGamesUSA.com"
131
132 # Patch UT-GOTY
133 cd setup.data
134 cp patch.dat{,.orig} || die "cp failed"
135 sed -e 's:sh uz-maps.sh:echo:' patch.dat.orig > patch.dat || die "sed failed"
136 ./bin/Linux/x86/loki_patch patch.dat "${Ddir}" || die "failed to patch"
137 cd "${S}"
138
139 # now we install the IpDrv.so patch
140 insinto "${dir}"/System
141 doins IpDrv.so || die "install IpDrv.so patch"
142
143 # install a few random files
144 insinto "${dir}"
145 doins README icon.{bmp,xpm} || die "installing random files"
146
147 # now, since these files are coming off a cd, the times/sizes/md5sums wont
148 # be different ... that means portage will try to unmerge some files (!)
149 # we run touch on ${D} so as to make sure portage doesnt do any such thing
150 find "${Ddir}" -exec touch '{}' \;
151 ### END ###
152 ###########
153
154 prepgamesdirs
155 }
156
157 pkg_postinst() {
158 games_pkg_postinst
159 elog "You might want to install the bonus packs too."
160 elog "Many servers on the internet use them, and the"
161 elog "majority of players do too."
162 elog
163 elog "Just run: emerge unreal-tournament-bonuspacks"
164 }

  ViewVC Help
Powered by ViewVC 1.1.20