Magellan Linux

Contents of /trunk/nonfree/quake3/quake3-1.32b3-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4209 - (show annotations) (download)
Mon Nov 30 10:17:14 2009 UTC (14 years, 5 months ago) by niro
File size: 3408 byte(s)
-moved to 'nonfree'
1 # $Header: /magellan-cvs/smage/quake3/quake3-1.32b3-r2.smage2,v 1.2 2008/02/07 14:23:53 niro Exp $
2
3 PNAME="quake3"
4 PVER="1.32b3"
5 PBUILD="r3"
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/openal-2005"
20
21 SDEPEND=">= dev-util/desktop-file-utils-0.10"
22
23 SRCFILE="linuxq3apoint-${PVER/b3/b-3}.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/${SRCFILE}
34 ftp://ftp.idsoftware.com/idstuff/quake3/linux/${SRCFILE}
35 mirror://${PNAME}/quake3-wrapper.sh
36 mirror://${PNAME}/quake3.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
56 src_install()
57 {
58 cd ${SRCDIR}
59
60 # needed directories
61 minstalldir /usr/bin || die
62 minstalldir /usr/games/quake3/baseq3 || die
63 minstalldir /usr/games/quake3/missionpack || die
64 minstalldir /usr/games/quake3/pb || die
65 minstalldir /usr/share/pixmaps || die
66
67 # install data
68 minstallfile baseq3/\*.pk3 /usr/games/quake3/baseq3 || die
69 minstallfile missionpack/\*.pk3 /usr/games/quake3/missionpack || die
70
71 # install libs and binaries
72 cp -a pb/* ${BINDIR}/usr/games/quake3/pb || die
73 minstallexec bin/Linux/x86/\* /usr/games/quake3 || die
74 local i
75 for i in quake3 quake3-smp
76 do
77 # build start wrapper
78 minstallexec -s quake3-wrapper.sh /usr/games/quake3/${i} || die
79 # symlink to /usr/bin
80 mlink /usr/games/quake3/${i} /usr/bin || die
81
82 # install desktop icons
83
84 # menu-entry for kde and gnome
85 minstall_desktop_icon \
86 --name ${i/q/Q} \
87 --file ${i} \
88 --exec ${i} \
89 --comment "First Person Shooter" \
90 --icon quake3.png \
91 --terminal \
92 --no-notify \
93 --categories "Game,ActionGame" \
94 || die
95 done
96
97 # pixmaps
98 minstallpixmap quake3.png || die
99
100 # install docs and other shared data
101 minstallfile CHANGES\* Q3A_EULA.txt README\* ${BINDIR}/usr/games/quake3 || die
102 minstalldocs CHANGES* Q3A_EULA.txt README* || die
103 cp -a Docs/* ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die
104
105 # set correct permissions
106 mchown -R root:games /usr/games/quake3 || die
107 mchown -R root:games /usr/bin || die
108 mchmod 0754 /usr/games/quake3/quake3* || die
109 mchmod 0754 /usr/games/quake3/q3ded || die
110 mchmod 0754 /usr/bin/quake3* || die
111 }
112
113 postinstall()
114 {
115 echo
116 echo "To run Quake3 Arena you must copy some files from the original cds."
117 echo "For Q3 Arena you need to copy pak0.pk3 into /usr/games/quake3/base3q."
118 echo "To play Q3 Team Arena copy pak0.pk3 to /usr/games/quake3/missionpack."
119 echo
120 echo "You need also a keyfile to play quake3, just create a txt-file with the key."
121 echo "Run as root: echo 11223344556677 > /usr/games/quake3/q3key"
122 echo "or as user: echo 11223344556677 > ~/.q3a/q3key"
123 echo
124 }

Properties

Name Value
svn:keywords Id