summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlashbunny2010-07-28 19:01:45 -0400
committerSlashbunny2010-07-28 19:01:45 -0400
commite09a82bdd19d84a961eea2d495309015b96f4b97 (patch)
treeaea1a930373c5e7f3371872f9a847918609ef0b0
parente4f40e6479cb01776cec5715948d70d86314d3cb (diff)
downloadaur-e09a82bdd19d84a961eea2d495309015b96f4b97.tar.gz
Misc quake2 pkg updates
* Use sqlquake2 * Install both expansions using a loop * Verbose logging * libjpeg fix
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD130
-rw-r--r--ctf.sh8
-rw-r--r--q2ded.sh8
-rw-r--r--quake2.sh8
-rw-r--r--rogue.sh8
-rw-r--r--xatrix.sh8
7 files changed, 141 insertions, 61 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2499efaf76c1..83f4d4b7eeee 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = quake2
pkgdesc = Quake 2 engine. You need the retail .pak files to play.
pkgver = r0.16.2
- pkgrel = 1
+ pkgrel = 3
url = http://www.icculus.org/quake2/
install = quake2.install
arch = i686
@@ -14,10 +14,18 @@ pkgbase = quake2
depends = libxxf86vm
depends = libxxf86dga
source = http://www.icculus.org/quake2/files/quake2-r0.16.2.tar.gz
- source = http://www.icculus.org/quake2/files/maxpak.pak
source = http://cesium.di.uminho.pt/pub/games/quake2/source/xatrixsrc320.shar.Z
source = http://cesium.di.uminho.pt/pub/games/quake2/source/roguesrc320.shar.Z
source = ftp://ftp.idsoftware.com/idstuff/quake2/q2-3.20-x86-full-ctf.exe
+ source = http://www.icculus.org/quake2/files/maxpak.pak
+ source = http://www.icculus.org/quake2/files/pak10.pak
+ source = http://www.icculus.org/quake2/files/pak11.pak
+ source = http://www.icculus.org/quake2/files/pak12.pak
+ source = http://www.icculus.org/quake2/files/pak13.pak
+ source = http://www.icculus.org/quake2/files/pak14.pak
+ source = http://www.icculus.org/quake2/files/pak16.pak
+ source = http://www.icculus.org/quake2/files/pak17.pak
+ source = http://www.icculus.org/quake2/files/pak19.pak
source = quake2.sh
source = q2ded.sh
source = xatrix.sh
@@ -26,15 +34,23 @@ pkgbase = quake2
source = snd_alsa.c
source = gnusource.patch
md5sums = 872fee27fb13a2a4c8876d5973c3c691
- md5sums = 04d3f1fb7fb4dada7175a41f4595c7eb
md5sums = 41fc4ecc4f25c068e7d1f488bd4a1e1a
md5sums = 7d5e052839c9e629bad0a6570aa70554
md5sums = 490557d4a90ff346a175d865a2bade87
- md5sums = ec5664163c74b4648b9782a0d844b26a
- md5sums = 77f6156b5cb3e7f72e7eb69710a91db2
- md5sums = 06fa0aff03dae18ae003699ce514046c
- md5sums = 396d146a53a2f9637f18d53e1bb0d877
- md5sums = 2c3f56b44d1f5e7f6b46e31877e190e0
+ md5sums = 04d3f1fb7fb4dada7175a41f4595c7eb
+ md5sums = fc2de3c33c23cca5f0e6fcec068ce616
+ md5sums = 221019679613a13c6d7e5f9e21701d85
+ md5sums = 0c8b49c303014e535394168aed9b668a
+ md5sums = 9628c82566535e48c59caaee5281b963
+ md5sums = 5d47605de09c458c7f1c69d8e6fea6a7
+ md5sums = 94b18e1f2d76fb7e7d0c5bd0ae8d7c69
+ md5sums = e24d79286ba3c1f3da1f9642a78c49af
+ md5sums = 070a4d00b93a2a427ca92adee2736000
+ md5sums = db757415bd3736cad2d52691e8cf7d55
+ md5sums = 50c72cc1ded252ee86db31ac8fa5b569
+ md5sums = 1a63caa4b66e6dbc63ed5c5fb15b9777
+ md5sums = 2deb322d859490f9178393abf74a3a27
+ md5sums = 3fe30c3a48f93f431ea191f13d49ea22
md5sums = c16644a6ddf93159ccc71e4c06e312c4
md5sums = 5788ed0d1bde8b00fa8b91a0c865f427
diff --git a/PKGBUILD b/PKGBUILD
index cef9d8800c41..d93a3d9434ef 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=quake2
pkgver=r0.16.2
-pkgrel=1
+pkgrel=3
pkgdesc="Quake 2 engine. You need the retail .pak files to play."
url="http://www.icculus.org/quake2/"
arch=('i686' 'x86_64')
@@ -13,48 +13,83 @@ depends=('libjpeg' 'sdl' 'libxxf86vm' 'libxxf86dga')
makedepends=('patch' 'unzip')
install="quake2.install"
source=("http://www.icculus.org/quake2/files/quake2-$pkgver.tar.gz" \
-'http://www.icculus.org/quake2/files/maxpak.pak' \
'http://cesium.di.uminho.pt/pub/games/quake2/source/xatrixsrc320.shar.Z' \
'http://cesium.di.uminho.pt/pub/games/quake2/source/roguesrc320.shar.Z' \
'ftp://ftp.idsoftware.com/idstuff/quake2/q2-3.20-x86-full-ctf.exe' \
+'http://www.icculus.org/quake2/files/maxpak.pak' \
+'http://www.icculus.org/quake2/files/pak10.pak' \
+'http://www.icculus.org/quake2/files/pak11.pak' \
+'http://www.icculus.org/quake2/files/pak12.pak' \
+'http://www.icculus.org/quake2/files/pak13.pak' \
+'http://www.icculus.org/quake2/files/pak14.pak' \
+'http://www.icculus.org/quake2/files/pak16.pak' \
+'http://www.icculus.org/quake2/files/pak17.pak' \
+'http://www.icculus.org/quake2/files/pak19.pak' \
'quake2.sh' 'q2ded.sh' 'xatrix.sh' 'rogue.sh' 'ctf.sh' 'snd_alsa.c' 'gnusource.patch')
md5sums=('872fee27fb13a2a4c8876d5973c3c691'
- '04d3f1fb7fb4dada7175a41f4595c7eb'
'41fc4ecc4f25c068e7d1f488bd4a1e1a'
'7d5e052839c9e629bad0a6570aa70554'
'490557d4a90ff346a175d865a2bade87'
- 'ec5664163c74b4648b9782a0d844b26a'
- '77f6156b5cb3e7f72e7eb69710a91db2'
- '06fa0aff03dae18ae003699ce514046c'
- '396d146a53a2f9637f18d53e1bb0d877'
- '2c3f56b44d1f5e7f6b46e31877e190e0'
+ '04d3f1fb7fb4dada7175a41f4595c7eb'
+ 'fc2de3c33c23cca5f0e6fcec068ce616'
+ '221019679613a13c6d7e5f9e21701d85'
+ '0c8b49c303014e535394168aed9b668a'
+ '9628c82566535e48c59caaee5281b963'
+ '5d47605de09c458c7f1c69d8e6fea6a7'
+ '94b18e1f2d76fb7e7d0c5bd0ae8d7c69'
+ 'e24d79286ba3c1f3da1f9642a78c49af'
+ '070a4d00b93a2a427ca92adee2736000'
+ 'db757415bd3736cad2d52691e8cf7d55'
+ '50c72cc1ded252ee86db31ac8fa5b569'
+ '1a63caa4b66e6dbc63ed5c5fb15b9777'
+ '2deb322d859490f9178393abf74a3a27'
+ '3fe30c3a48f93f431ea191f13d49ea22'
'c16644a6ddf93159ccc71e4c06e312c4'
'5788ed0d1bde8b00fa8b91a0c865f427')
build() {
cd $srcdir
+ # Computer Architecture Variable used by Quake2
+ [ "$CARCH" = "i686" ] && _dirarch=i386
+ [ "$CARCH" = "x86_64" ] && _dirarch=x86_64
+
# Create Temporary Directories
install -d $pkgname-$pkgver/src/xatrix $pkgname-$pkgver/src/rogue
- # Decompress and patch The Reckoning (xatrix) Expansion
- cp $srcdir/xatrixsrc320.shar.Z $srcdir/$pkgname-$pkgver/src/xatrix
- cd $srcdir/$pkgname-$pkgver/src/xatrix
- uncompress xatrixsrc320.shar.Z
- sh xatrixsrc320.shar
- /bin/sed -e "s/extern\tint\tjacket_armor_index/static\tint\tjacket_armor_index/" -i g_local.h
- /bin/sed -e "s/extern\tint\tcombat_armor_index/static\tint\tcombat_armor_index/" -i g_local.h
- /bin/sed -e "s/extern\tint\tbody_armor_index/static\tint\tbody_armor_index/" -i g_local.h
-
- # Decompress and patch Ground Zero (rouge) Expansion
- cp $srcdir/roguesrc320.shar.Z $srcdir/$pkgname-$pkgver/src/rogue
- cd $srcdir/$pkgname-$pkgver/src/rogue
- uncompress roguesrc320.shar.Z
- sh roguesrc320.shar
- /bin/sed -e "s/#include <nan.h>/#include <bits\/nan.h>/" -i g_local.h
- /bin/sed -e "s/extern\tint\tjacket_armor_index/static\tint\tjacket_armor_index/" -i g_local.h
- /bin/sed -e "s/extern\tint\tcombat_armor_index/static\tint\tcombat_armor_index/" -i g_local.h
- /bin/sed -e "s/extern\tint\tbody_armor_index/static\tint\tbody_armor_index/" -i g_local.h
+ # Decompress and patch The Reckoning (xatrix) and Ground Zero (rouge) Expansions
+ for _addon in xatrix rogue; do
+ _shar=${_addon}src320.shar
+
+ cp $srcdir/${_shar}.Z $srcdir/$pkgname-$pkgver/src/${_addon}
+ cd $srcdir/$pkgname-$pkgver/src/${_addon}
+
+ # Decompress
+ msg "Unpacking ${_shar}.Z"
+ uncompress ${_shar}.Z
+
+ # Remove Prompts
+ /bin/sed -i -e 's:^read ans:ans=yes :' ${_shar}
+ /bin/sed -i -e 's:^more <<EOF:cat <<EOF:' ${_shar}
+
+ # Run Installer
+ msg "Running ${_shar}"
+ sh ${_shar}
+
+ msg "Patching ${_addon}"
+
+ # Patch (rogue-only)
+ if [ ${_addon} = "rogue" ]; then
+ /bin/sed -e "s/#include <nan.h>/#include <bits\/nan.h>/" -i g_local.h
+ fi
+
+ # Patches (Both Expansions)
+ /bin/sed -e "s/extern\tint\tjacket_armor_index/static\tint\tjacket_armor_index/" -i g_local.h
+ /bin/sed -e "s/extern\tint\tcombat_armor_index/static\tint\tcombat_armor_index/" -i g_local.h
+ /bin/sed -e "s/extern\tint\tbody_armor_index/static\tint\tbody_armor_index/" -i g_local.h
+ done
+
+ msg "The Reckoning and Ground Zero Expansion install complete"
cd $srcdir/$pkgname-$pkgver/
@@ -64,20 +99,28 @@ build() {
# x86_64 patch from Gentoo
patch -p1 < $srcdir/gnusource.patch
+ # libjpeg Fix
+ /bin/sed -i -e 's:jpeg_mem_src:_&:' \
+ $srcdir/$pkgname-$pkgver/src/ref_candygl/gl_image.c
+
+ msg "Compiling Quake 2"
+
# Compile Quake 2
make -s BUILD_XATRIX=YES BUILD_ROGUE=YES BUILD_DEDICATED=YES BUILD_CTF=YES BUILD_QMAX=YES build_release
- [ "$CARCH" = "i686" ] && _dirarch=i386
- [ "$CARCH" = "x86_64" ] && _dirarch=x86_64
-
cd $srcdir/$pkgname-$pkgver/release$_dirarch
# Create Destination Directories
install -d $pkgdir/opt/quake2/{baseq2,ctf,xatrix,rogue}
+ # Install Binary
+ install -m 755 quake2 $pkgdir/opt/quake2/quake2
+
+ # Install Binary (SDL)
+ install -m 755 sdlquake2 $pkgdir/opt/quake2/sdlquake2
+
# Install Base Game Library
install -m 755 game$_dirarch.so $pkgdir/opt/quake2/baseq2/
- cp * $pkgdir/opt/quake2/
# Install CTF Library
install -m 755 ctf/game$_dirarch.so $pkgdir/opt/quake2/ctf/
@@ -88,10 +131,10 @@ build() {
# Install Rogue Library
install -m 755 rogue/game$_dirarch.so $pkgdir/opt/quake2/rogue/
- cd $srcdir
+ # Install Additional Libraries
+ cp ref_*.so $pkgdir/opt/quake2/baseq2/
- # Install Pak File
- install $srcdir/maxpak.pak $pkgdir/opt/quake2/baseq2/
+ cd $srcdir
# Decompress and Install CTF Patch Data
mkdir $srcdir/q2
@@ -102,18 +145,19 @@ build() {
cp -r baseq2/players $pkgdir/opt/quake2/baseq2/
cp ctf/* $pkgdir/opt/quake2/ctf/
- cd $srcdir
+ # Install Q2Max Pak File
+ install $srcdir/maxpak.pak $pkgdir/opt/quake2/baseq2/
- # x86_64 has the default ref_softx.so disabled, use glx
- if [ "$CARCH" = "x86_64" ]; then
- /bin/sed -e 's|/quake2 |/quake2 +set vid_ref glx |' -i *.sh
- fi
+ # Install Additional pak Files
+ for i in {10,11,12,13,14,16,17,19}; do
+ install -m 644 $srcdir/pak${i}.pak $pkgdir/opt/quake2/baseq2/pak${i}.pak
+ done;
# Install Game Launchers
- install -D -m 755 quake2.sh $pkgdir/usr/bin/quake2
- install -D -m 755 q2ded.sh $pkgdir/usr/bin/q2ded
- install -D -m 755 xatrix.sh $pkgdir/usr/bin/quake2-the-reckoning
- install -D -m 755 rogue.sh $pkgdir/usr/bin/quake2-ground-zero
- install -D -m 755 ctf.sh $pkgdir/usr/bin/quake2-ctf
+ install -D -m 755 $startdir/quake2.sh $pkgdir/usr/bin/quake2
+ install -D -m 755 $startdir/q2ded.sh $pkgdir/usr/bin/q2ded
+ install -D -m 755 $startdir/xatrix.sh $pkgdir/usr/bin/quake2-the-reckoning
+ install -D -m 755 $startdir/rogue.sh $pkgdir/usr/bin/quake2-ground-zero
+ install -D -m 755 $startdir/ctf.sh $pkgdir/usr/bin/quake2-ctf
}
diff --git a/ctf.sh b/ctf.sh
index 5ddd8b89be99..e5f2fb0389fb 100644
--- a/ctf.sh
+++ b/ctf.sh
@@ -1,2 +1,6 @@
-#!/bin/sh
-exec /opt/quake2/quake2 +set basedir /opt/quake2 +set game ctf +set dedicated 1 $*
+#!/bin/bash
+
+cd "/opt/quake2"
+./sdlquake2 +set basedir /opt/quake2 +set game ctf +set dedicated 1 $*
+exit $?
+
diff --git a/q2ded.sh b/q2ded.sh
index e719375317b4..d54e1720c49c 100644
--- a/q2ded.sh
+++ b/q2ded.sh
@@ -1,2 +1,6 @@
-#!/bin/sh
-exec /opt/quake2/q2ded +set basedir /opt/quake2 $* \ No newline at end of file
+#!/bin/bash
+
+cd "/opt/quake2"
+./q2ded +set basedir /opt/quake2 $*
+exit $?
+
diff --git a/quake2.sh b/quake2.sh
index e4c7f8d63f13..4cfa862ae103 100644
--- a/quake2.sh
+++ b/quake2.sh
@@ -1,2 +1,6 @@
-#!/bin/sh
-exec /opt/quake2/quake2 +set basedir /opt/quake2 $*
+#!/bin/bash
+
+cd "/opt/quake2"
+./sdlquake2 +set basedir /opt/quake2 $*
+exit $?
+
diff --git a/rogue.sh b/rogue.sh
index dcca76167aff..444a000ac09b 100644
--- a/rogue.sh
+++ b/rogue.sh
@@ -1,2 +1,6 @@
-#!/bin/sh
-exec /opt/quake2/quake2 +set basedir /opt/quake2 +set game rogue $*
+#!/bin/bash
+
+cd "/opt/quake2"
+./sdlquake2 +set basedir /opt/quake2 +set game rouge $*
+exit $?
+
diff --git a/xatrix.sh b/xatrix.sh
index 6a15a0eb05ff..7423f738f30a 100644
--- a/xatrix.sh
+++ b/xatrix.sh
@@ -1,2 +1,6 @@
-#!/bin/sh
-exec /opt/quake2/quake2 +set basedir /opt/quake2 +set game xatrix $*
+#!/bin/bash
+
+cd "/opt/quake2"
+./sdlquake2 +set basedir /opt/quake2 +set game xatrix $*
+exit $?
+