Magellan Linux

Annotation of /trunk/nonfree/quake3/quake3-1.32b3-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4209 - (hide annotations) (download)
Mon Nov 30 10:17:14 2009 UTC (14 years, 6 months ago) by niro
File size: 3347 byte(s)
-moved to 'nonfree'
1 niro 2 # $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="r2"
6    
7     PCATEGORIE="x11-games"
8     STATE="testing"
9    
10     DESCRIPTION="Quake III (Team-) Arena"
11     HOMEPAGE="http://www.idsoftware.com/games/quake/quake3-arena/"
12    
13     DEPEND=">= virtual/opengl
14     >= media-libs/libsdl-1.2
15     >= media-libs/openal-2005"
16    
17     SDEPEND=">= dev-util/desktop-file-utils-0.10"
18    
19     SRCFILE="linuxq3apoint-${PVER/b3/b-3}.x86.run"
20     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
21    
22     # do not strip any binaries
23     NOSTRIP=true
24    
25     sminclude mtools xdg
26    
27     SRC_URI=(
28     mirror://${PNAME}/${SRCFILE}
29     ftp://ftp.idsoftware.com/idstuff/quake3/linux/${SRCFILE}
30     http://games.mirrors.tds.net/pub/planetquake3/${SRCFILE}
31     mirror://${PNAME}/quake3-wrapper.sh
32     mirror://${PNAME}/quake3.png
33     )
34    
35     src_prepare()
36     {
37     install -d ${SRCDIR} || die
38     cd ${SRCDIR}
39    
40     # determinate binary offset for makeself 2.1.3
41     # check with ver=$(grep -a '#.*Makeself' "${src}" | awk '{print $NF}')
42     # and see http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/eutils.eclass
43     # for more information (unpack_makeself)
44     local src=${SOURCEDIR}/${PNAME}/${SRCFILE}
45     offset=$(grep -a ^offset= ${src} | awk '{print $3}')
46     let offset="offset + 1"
47    
48     # unpack
49     tail -n +${offset} ${src} | tar --no-same-owner -xzvf - || die
50     }
51    
52     src_install()
53     {
54     cd ${SRCDIR}
55    
56     # needed directories
57     minstalldir /usr/bin || die
58     minstalldir /usr/games/quake3/baseq3 || die
59     minstalldir /usr/games/quake3/missionpack || die
60     minstalldir /usr/games/quake3/pb || die
61     minstalldir /usr/share/pixmaps || die
62    
63     # install data
64     install -m0644 baseq3/*.pk3 ${BINDIR}/usr/games/quake3/baseq3 || die
65     install -m0644 missionpack/*.pk3 ${BINDIR}/usr/games/quake3/missionpack || die
66    
67     # install libs and binaries
68     cp -a pb/* ${BINDIR}/usr/games/quake3/pb || die
69     install -m0755 bin/Linux/x86/* ${BINDIR}/usr/games/quake3 || die
70     local i
71     for i in quake3 quake3-smp
72     do
73     # build start wrapper
74     minstallexec -s quake3-wrapper.sh /usr/games/quake3/${i} || die
75     # symlink to /usr/bin
76     mlink /usr/games/quake3/${i} /usr/bin || die
77    
78     # install desktop icons
79    
80     # menu-entry for kde and gnome
81     minstall_desktop_icon \
82     --name ${i/q/Q} \
83     --file ${i} \
84     --exec ${i} \
85     --comment "First Person Shooter" \
86     --icon quake3.png \
87     --terminal \
88     --no-notify \
89     --categories "Game,ActionGame" \
90     || die
91     done
92    
93     # pixmaps
94     minstallpixmap quake3.png || die
95    
96     # install docs and other shared data
97     install -m 0644 CHANGES* Q3A_EULA.txt README* ${BINDIR}/usr/games/quake3 || die
98     minstalldocs CHANGES* Q3A_EULA.txt README* || die
99     cp -a Docs/* ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die
100    
101     # set correct permissions
102     mchown -R root:games /usr/games/quake3 || die
103     mchown -R root:games /usr/bin || die
104     mchmod 0754 /usr/games/quake3/quake3* || die
105     mchmod 0754 /usr/games/quake3/q3ded || die
106     mchmod 0754 /usr/bin/quake3* || die
107     }
108    
109     postinstall()
110     {
111     echo
112     echo "To run Quake3 Arena you must copy some files from the original cds."
113     echo "For Q3 Arena you need to copy pak0.pk3 into /usr/games/quake3/base3q."
114     echo "To play Q3 Team Arena copy pak0.pk3 to /usr/games/quake3/missionpack."
115     echo
116     echo "You need also a keyfile to play quake3, just create a txt-file with the key."
117     echo "Run as root: echo 11223344556677 > /usr/games/quake3/q3key"
118     echo "or as user: echo 11223344556677 > ~/.q3a/q3key"
119     echo
120     }

Properties

Name Value
svn:keywords Id