Magellan Linux

Annotation of /trunk/todo/quake4/quake4-1.4.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (hide annotations) (download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 8 months ago) by niro
Original Path: trunk/extras/quake4/quake4-1.4.2-r1.smage2
File size: 3566 byte(s)
import repo
1 niro 2 # $Header: /magellan-cvs/smage/quake4/quake4-1.4.2-r1.smage2,v 1.10 2008/06/13 16:10:11 niro Exp $
2    
3     PNAME="quake4"
4     PVER="1.4.2"
5     PBUILD="r1"
6    
7     PCATEGORIE="x11-games"
8     STATE="unstable"
9    
10     DESCRIPTION="Quake III (Team-) Arena"
11     HOMEPAGE="http://www.idsoftware.com/games/quake/quake3-arena/"
12    
13     DEPEND=">= virtual/opengl
14     >= x11-libs/libXext-1
15     >= x11-libs/libX11-1
16     >= x11-libs/libXau-1
17     >= x11-libs/libXdmcp-1
18     >= media-libs/libsdl-1.2
19     >= media-libs/alsa-lib-1.0.16"
20    
21     SDEPEND=">= dev-util/desktop-file-utils-0.15"
22    
23     SRCFILE="${PNAME}-linux-${PVER}.x86.run"
24     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
25    
26     # do not strip any binaries
27     NOSTRIP=true
28    
29     sminclude mtools xdg
30    
31     SRC_URI=(
32     mirror://${PNAME}/${SRCFILE}
33     http://games.mirrors.tds.net/pub/planetquake3/${PNAME}/point_releases/${SRCFILE}
34     ftp://ftp.idsoftware.com/idstuff/${PNAME}/linux/${SRCFILE}
35     mirror://${PNAME}/quake4-wrapper.sh
36     mirror://${PNAME}/quake4.png
37     )
38    
39     src_prepare()
40     {
41     install -d ${SRCDIR} || die
42     cd ${SRCDIR}
43    
44     # determinate binary offset for makeself 2.1.3
45     # check with ver=$(grep -a '#.*Makeself' "${src}" | awk '{print $NF}')
46     # and see http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/eutils.eclass
47     # for more information (unpack_makeself)
48     local src=${SOURCEDIR}/${PNAME}/${SRCFILE}
49     offset=$(grep -a ^offset= ${src} | awk '{print $3}')
50     let offset="offset + 1"
51    
52     # unpack
53     tail -n +${offset} ${src} | tar --no-same-owner -xzvf - || die
54    
55     # needed to install all languages
56     rename pk4.off pk4 q4base/*.pk4.off || die
57     }
58    
59     src_install()
60     {
61     cd ${SRCDIR}
62    
63     # needed directories
64     minstalldir /usr/bin || die
65     minstalldir /usr/games/quake4/q4base || die
66     minstalldir /usr/games/quake4/pb || die
67     minstalldir /usr/games/quake4/q4mp || die
68     minstalldir /usr/share/pixmaps || die
69    
70     # install data
71     minstallfile q4base/\*.pk4 /usr/games/quake4/q4base || die
72     minstallfile us/q4base/\*.pk4 /usr/games/quake4/q4base || die
73    
74     # install libs and binaries
75     cp -a pb/* ${BINDIR}/usr/games/quake4/pb || die
76     cp -a q4mp/* ${BINDIR}/usr/games/quake4/q4mp || die
77     minstallexec bin/Linux/${ARCH/i*86/x86}/quake4.x86 /usr/games/quake4 || die
78     minstallexec bin/Linux/${ARCH/i*86/x86}/quake4smp.x86 /usr/games/quake4/quake4-smp.x86 || die
79     minstallexec bin/Linux/${ARCH/i*86/x86}/q4ded.x86 /usr/games/quake4 || die
80     minstallexec bin/Linux/${ARCH/i*86/x86}/\*.so.\* /usr/games/quake4 || die
81     local i
82     for i in quake4 quake4-smp
83     do
84     # build start wrapper
85     minstallexec -s quake4-wrapper.sh /usr/games/quake4/${i} || die
86     # symlink to /usr/bin
87     mlink /usr/games/quake4/${i} /usr/bin || die
88    
89     # install desktop icons
90    
91     # menu-entry for kde and gnome
92     minstall_desktop_icon \
93     --name ${i/q/Q} \
94     --file ${i} \
95     --exec ${i} \
96     --comment "First Person Shooter" \
97     --icon quake4.png \
98     --terminal \
99     --no-notify \
100     --categories "Game,ActionGame" \
101     || die
102     done
103    
104     # pixmaps
105     minstallpixmap quake4.png || die
106    
107     # install docs and other shared data
108     install -m0644 CHANGES* License.txt README* ${BINDIR}/usr/games/quake4 || die
109     minstalldocs CHANGES* License.txt README* || die
110     cp -a Docs/* ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die
111    
112     # set correct permissions
113     mchown -R root:games /usr/games/quake4 || die
114     mchown -R root:games /usr/bin || die
115     mchmod 0754 /usr/games/quake4/quake4* || die
116     mchmod 0754 /usr/games/quake4/q4ded* || die
117     mchmod 0754 /usr/bin/quake4* || die
118     }
119    
120     postinstall()
121     {
122     echo
123     echo "In order to run Quake4 you must copy some files from the original DVD."
124     echo " You need to copy pak001.pk4 up to pak012.pk4"
125     echo " and every zpak*.pk4 into /usr/games/quake4/q4base."
126     echo
127     }

Properties

Name Value
svn:keywords Id