updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / ioquake3-svn / PKGBUILD
blob558b8331955ffaee54c3fb43fbaec2a11da5370a
1 # Contributor: Slash <demodevil5[at]yahoo[dot]com>
3 pkgname=ioquake3-svn
4 pkgver=2196
5 pkgrel=1
6 pkgdesc="The de-facto OSS Quake 3 distribution. You need the retail/demo .pk3 files to play."
7 url="http://ioquake3.org/"
8 license='GPL'
9 arch=('i686' 'x86_64')
10 depends=('sdl' 'openal')
11 makedepends=('nasm' 'subversion')
12 conflicts=('quake3' 'quake3-icculus-svn' 'quake3-svn')
13 provides=('quake3')
14 replaces=('quake3-icculus-svn')
15 install=quake3.install
16 source=('quake3.desktop' 'quake3.launcher' 'quake3ded.launcher' \
17 'http://ftp.gwdg.de/pub/misc/ftp.idsoftware.com/idstuff/quake3/linux/linuxq3apoint-1.32b-3.x86.run')
18 md5sums=('9eca51e2b3ee3e0100944cba436a2a4c'
19          'ea5d99df80b41269523b34229fdf854d'
20          'ea5d99df80b41269523b34229fdf854d'
21          'c71fdddccb20e8fc393d846e9c61d685')
23 _svntrunk=svn://svn.icculus.org/quake3/trunk
24 _svnmod=quake3
25 _revnumber=$pkgver
27 build() {
28     cd $srcdir
30     # Be sure to have a ~/.subversion.  If it doesn't exist, touch it.
31     touch ~/.subversion/
33     # Checkout Files
34     svn co $_svntrunk --config-dir ./ -r $_revnumber $_svnmod
35     cd $_svnmod
37     msg "SVN checkout done or server timeout"
38     msg "Starting make..."
40     # Copy files to build directory
41     mkdir ../$_svnmod-build
42     cp -r * ../$_svnmod-build
43     cd ../$_svnmod-build
45     # Modify Makefile to correct install path
46     /bin/sed -i "s:/usr/local/games/quake3:$pkgdir/opt/quake3:" Makefile
48     # Compile ioQuake3
49     make || return 1
51     # Install Files
52     make copyfiles || return 1
54     # Extract Patch Files
55     cd $srcdir/
56     chmod +x $srcdir/linuxq3apoint-1.32b-3.x86.run
57     $srcdir/linuxq3apoint-1.32b-3.x86.run --tar xf
59     # Modify Launcher Scripts
60     if [ "$CARCH" = "x86_64" ]; then
61         #
62         # x86_64 Systems
63         #
64         /bin/sed -i "s:IOQ3_BINARY:ioquake3.x86_64:" \
65             $srcdir/quake3.launcher
66         /bin/sed -i "s:IOQ3_BINARY:ioq3ded.x86_64:" \
67             $srcdir/quake3ded.launcher
68     else
69         #
70         # i686 Systems
71         #
72         /bin/sed -i "s:IOQ3_BINARY:ioquake3.i386:" \
73         $srcdir/quake3.launcher
74         /bin/sed -i "s:IOQ3_BINARY:ioq3ded.i386:" \
75         $srcdir/quake3ded.launcher
76     fi
78     # Install Quake 3 Patch Files
79     install -m 644 $srcdir/baseq3/*.pk3 \
80         $pkgdir/opt/quake3/baseq3/
82     # Install Quake 3 Expansion Pack Patch Files
83     install -m 644 $srcdir/missionpack/*.pk3 \
84         $pkgdir/opt/quake3/missionpack/
86     # Install Launcher (Client)
87     install -D -m 755 $srcdir/quake3.launcher \
88         $pkgdir/usr/bin/quake3
90     # Install Launcher (Server)
91     install -D -m 755 $srcdir/quake3ded.launcher \
92         $pkgdir/usr/bin/quake3ded
94     # Install Desktop File
95     install -D -m 644 $srcdir/quake3.desktop \
96         $pkgdir/usr/share/applications/quake3.desktop
98     # Install Icon File
99     install -D -m 644 $srcdir/quake3-build/misc/quake3.png \
100         $pkgdir/usr/share/pixmaps/quake3.png