/[gentoo-x86]/eclass/games-ut2k4mod.eclass
Gentoo

Diff of /eclass/games-ut2k4mod.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.9 Revision 1.10
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/games-ut2k4mod.eclass,v 1.9 2006/09/28 21:32:12 wolf31o2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/games-ut2k4mod.eclass,v 1.10 2007/03/07 15:23:39 wolf31o2 Exp $
4 4
5inherit games 5inherit games
6 6
7 7
8EXPORT_FUNCTIONS pkg_nofetch src_unpack src_install pkg_postinst 8EXPORT_FUNCTIONS pkg_nofetch src_unpack src_install pkg_postinst
27 # The following is a nasty mess to determine if we are installing from 27 # The following is a nasty mess to determine if we are installing from
28 # a DVD or from multiple CDs. Anyone feel free to submit patches to this 28 # a DVD or from multiple CDs. Anyone feel free to submit patches to this
29 # to bugs.gentoo.org as I know it is a very ugly hack. 29 # to bugs.gentoo.org as I know it is a very ugly hack.
30 USE_DVD= 30 USE_DVD=
31 USE_ECE_DVD= 31 USE_ECE_DVD=
32 if [ -n "${CD_ROOT}" ] 32 if [[ -n "${CD_ROOT}" ]]
33 then 33 then
34 [ -d "${CD_ROOT}/CD1" ] && USE_DVD=1 34 [[ -d "${CD_ROOT}/CD1" ]] && USE_DVD=1
35 [ -d "${CD_ROOT}/CD7" ] && USE_ECE_DVD=1 35 [[ -d "${CD_ROOT}/CD7" ]] && USE_ECE_DVD=1
36 else 36 else
37 local mline="" 37 local mline=""
38 for mline in `mount | egrep -e '(iso|cdrom)' | awk '{print $3}'` 38 for mline in `mount | egrep -e '(iso|cdrom)' | awk '{print $3}'`
39 do 39 do
40 [ -d "${mline}/CD1" ] && USE_DVD=1 40 [[ -d "${mline}/CD1" ]] && USE_DVD=1
41 [ -d "${mline}/CD7" ] && USE_ECE_DVD=1 41 [[ -d "${mline}/CD7" ]] && USE_ECE_DVD=1
42 done 42 done
43 fi 43 fi
44} 44}
45 45
46games-ut2k4mod_pkg_nofetch() { 46games-ut2k4mod_pkg_nofetch() {
47 einfo "Please download ${A} and put it into ${DISTDIR}" 47 einfo "Please download ${A} and put it into ${DISTDIR}"
48 einfo "http://liflg.org/?catid=6&gameid=17" 48 einfo "http://liflg.org/?catid=6&gameid=17"
49} 49}
50 50
51games-ut2k4mod_src_unpack() { 51games-ut2k4mod_src_unpack() {
52 [ -z "${MOD_TBZ2}" ] && die "what are we supposed to unpack ?" 52 [[ -z "${MOD_TBZ2}" ]] && die "what are we supposed to unpack ?"
53 [ -z "${MOD_NAME}" ] && die "what is the name of this ut2k4mod ?" 53 [[ -z "${MOD_NAME}" ]] && die "what is the name of this ut2k4mod ?"
54 54
55 for src_uri in ${A} 55 for src_uri in ${A}
56 do 56 do
57 URI_SUFFIX="${src_uri##*.}" 57 URI_SUFFIX="${src_uri##*.}"
58 case ${URI_SUFFIX##*.} in 58 case ${URI_SUFFIX##*.} in
71 done 71 done
72 72
73 mkdir ${S}/unpack 73 mkdir ${S}/unpack
74 for tarball in ${MOD_TBZ2} 74 for tarball in ${MOD_TBZ2}
75 do 75 do
76 if [ -e "${tarball}_${PV}-english.tar.bz2" ] 76 if [[ -e "${tarball}_${PV}-english.tar.bz2" ]]
77 then 77 then
78 tar xjf ${tarball}_${PV}-english.tar.bz2 -C ${S}/unpack \ 78 tar xjf ${tarball}_${PV}-english.tar.bz2 -C ${S}/unpack \
79 || die "uncompressing tarball" 79 || die "uncompressing tarball"
80 elif [ -e "${tarball}_${PV}.tar.bz2" ] 80 elif [[ -e "${tarball}_${PV}.tar.bz2" ]]
81 then 81 then
82 tar xjf ${tarball}_${PV}.tar.bz2 -C ${S}/unpack \ 82 tar xjf ${tarball}_${PV}.tar.bz2 -C ${S}/unpack \
83 || die "uncompressing tarball" 83 || die "uncompressing tarball"
84 else [ -e "${tarball}.tar.bz2" ] 84 else [[ -e "${tarball}.tar.bz2" ]]
85 tar xjf ${tarball}.tar.bz2 -C ${S}/unpack \ 85 tar xjf ${tarball}.tar.bz2 -C ${S}/unpack \
86 || die "uncompressing tarball" 86 || die "uncompressing tarball"
87 fi 87 fi
88 done 88 done
89} 89}
94 94
95 for readme in README* 95 for readme in README*
96 do 96 do
97 dodoc ${readme} || die "dodoc failed" 97 dodoc ${readme} || die "dodoc failed"
98 done 98 done
99 if [ -n "${MOD_BINS}" ] 99 if [[ -n "${MOD_BINS}" ]]
100 then 100 then
101 exeinto ${dir} 101 exeinto ${dir}
102 doexe bin/${MOD_BINS} || die "doexe failed" 102 doexe bin/${MOD_BINS} || die "doexe failed"
103 games_make_wrapper ${MOD_BINS} ./${MOD_BINS} ${dir} 103 games_make_wrapper ${MOD_BINS} ./${MOD_BINS} ${dir}
104 make_desktop_entry ${MOD_BINS} "UT2004 - ${MOD_NAME}" ${MOD_ICON} 104 make_desktop_entry ${MOD_BINS} "UT2004 - ${MOD_NAME}" ${MOD_ICON}
108 108
109 prepgamesdirs 109 prepgamesdirs
110} 110}
111 111
112games-ut2k4mod_pkg_postinst() { 112games-ut2k4mod_pkg_postinst() {
113 if [ -n "${MOD_BINS}" ] 113 if [[ -n "${MOD_BINS}" ]]
114 then 114 then
115 einfo "To play this mod run:" 115 einfo "To play this mod run:"
116 einfo " ${MOD_BINS}" 116 einfo " ${MOD_BINS}"
117 fi 117 fi
118 118

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20