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

Contents of /eclass/games-ut2k4mod.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Thu Nov 25 00:08:12 2004 UTC (13 years, 7 months ago) by wolf31o2
Branch: MAIN
Initial version ut2k4mod eclass for UT2004 mods using the LIFLG installers.

1 wolf31o2 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/eclass/games-q3mod.eclass,v 1.23 2004/09/28 03:26:51 mr_bones_ Exp $
4    
5     inherit games
6    
7     ECLASS=games-ut2k4mod
8     INHERITED="$INHERITED $ECLASS"
9    
10     EXPORT_FUNCTIONS pkg_fetch src_unpack src_install pkg_postinst
11    
12     DESCRIPTION="UT2004 - ${MOD_DESC}"
13    
14     SLOT="0"
15     KEYWORDS="-* x86 amd64"
16     IUSE=""
17     RESTRICT="nomirror fetch"
18    
19     DEPEND="app-arch/tar
20     app-arch/bzip2"
21    
22     RDEPEND="virtual/libc
23     >=games-fps/ut2004-3339"
24    
25     S=${WORKDIR}
26     dir=${GAMES_PREFIX_OPT}/ut2004
27     Ddir=${D}/${dir}
28    
29     games-ut2k4mod_pkg_fetch() {
30     einfo "Please download ${A} and put it into ${DISTDIR}"
31     einfo "http://liflg.org/?catid=6&gameid=17"
32     }
33    
34     games-ut2k4mod_src_unpack() {
35     dodir ${dir}
36     unpack_makeself
37     mkdir ${S}/unpack
38     if [ -e ${MOD_TBZ2}_${PV}-english.tar.bz2 ]
39     then
40     tar xjf ${MOD_TBZ2}_${PV}-english.tar.bz2 -C ${S}/unpack \
41     || die "uncompressing tarball"
42     elif [ -e ${MOD_TBZ2}_${PV}.tar.bz2 ]
43     then
44     tar xjf ${MOD_TBZ2}_${PV}.tar.bz2 -C ${S}/unpack \
45     || die "uncompressing tarball"
46     else
47     tar xjf ${MOD_TBZ2}.tar.bz2 -C ${S}/unpack \
48     || die "uncompressing tarball"
49     fi
50     }
51    
52     games-ut2k4mod_src_install() {
53     [ -z "${MOD_NAME}" ] && die "what is the name of this ut2k4mod ?"
54    
55     dodir ${dir}
56     cp -r ${S}/unpack/* ${Ddir}
57    
58     if [ -e ${S}/README.${MOD_BINS} ]
59     then
60     dodoc README.${MOD_BINS} || die "dodoc failed"
61     else
62     dodoc README.${MOD_TBZ2} || die "dodoc failed"
63     fi
64     exeinto ${dir}
65     doexe bin/${MOD_BINS} || die "doexe failed"
66    
67     games_make_wrapper ${MOD_BINS} ./${MOD_BINS} ${dir}
68    
69     insinto /usr/share/pixmaps
70     [ -e ${MOD_ICON} ] && doins ${MOD_ICON}
71    
72     prepgamesdirs
73     make_desktop_entry ${MOD_BINS} "UT2004 - ${MOD_NAME}" ${MOD_ICON}
74     }
75    
76     games-ut2k4mod_pkg_postinst() {
77    
78     einfo "To play this mod run:"
79     einfo " ${MOD_BINS}"
80    
81     games_pkg_postinst
82     }

  ViewVC Help
Powered by ViewVC 1.1.20