updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / quake4 / PKGBUILD
blob16d6cabebafba7f6a34535d529c7fc890750e420
1 # Contributor: Slash <demodevil5 [at] yahoo [dot] com>
3 pkgname=quake4
4 pkgver=1.4.2
5 pkgrel=3
6 pkgdesc="Quake 4 Engine. You need the retail .pk4 files to play."
7 url="http://www.quake4game.com/"
8 license=('custom:"Quake 4"' \
9          'custom:"PunkBuster"')
10 if [ "$CARCH" = "x86_64" ]; then
11     depends=('lib32-glibc' 'lib32-sdl' 'lib32-libx11' 'lib32-libxext' 'lib32-zlib')
12     optdepends=('lib32-nvidia-utils: Accelerated 3D with the NVIDIA binary blob video driver'
13                 'lib32-catalyst-utils: Accelerated 3D with the AMD/ATI binary blob video driver')
14 else
15     depends=('gcc-libs' 'libgl' 'sdl' 'zlib')
17 arch=('i686' 'x86_64')
18 install=quake4.install
19 source=('quake4.desktop' 'quake4.launcher' 'quake4-dedicated.launcher' 'quake4-smp.launcher' \
20 "http://www.1337-server.net/quake4/quake4-linux-${pkgver}.x86.run.gz")
21 md5sums=('c05b4551aa7cc8728eee9e3f94fcea1e'
22          'ece76fd2e52d2eec7584ab1e8832410b'
23          'b479a067fdf376384e39cbff41911327'
24          '19acb4c06f9c8e7bf03aa021c56e4242'
25          'b186954ab5fbadd57f7ca9519b5b0503')
27 build() {
28     cd $srcdir
30     # Create Destination Directories
31     install -d $pkgdir/opt/
33     # Make Installer Executable
34     chmod +x $srcdir/quake4-linux-${pkgver}.x86.run
36     # Extract Files from Installer
37     $srcdir/quake4-linux-${pkgver}.x86.run --noexec --target quake4
39     # Move pk4 files to correct location
40     mv $srcdir/quake4/us/q4base/*.pk4 \
41         $srcdir/quake4/q4base/
43     # Move Executables and Libraries
44     install -m 755 -t $srcdir/quake4/ \
45         $srcdir/quake4/bin/Linux/x86/{lib*,q4ded*,quake4*}
47     # Make Everything World-Readable
48     chmod -R a+r $srcdir/quake4/
50     # Remove Unneeded Files
51     rm -rf $srcdir/quake4/{germany/,setup.data/,setup.sh,us/,bin/}
53     # Move Quake4 to Destination Directory
54     mv $srcdir/quake4 $pkgdir/opt/
56     # Install Launcher (Client)
57     install -D -m 755 $srcdir/quake4.launcher \
58         $pkgdir/usr/bin/quake4
60     # Install Launcher (Client - SMP)
61     install -D -m 755 $srcdir/quake4-smp.launcher \
62         $pkgdir/usr/bin/quake4-smp
64     # Install Launcher (Server)
65     install -D -m 755 $srcdir/quake4-dedicated.launcher \
66         $pkgdir/usr/bin/quake4-dedicated
68     # Install License (Quake 4)
69     install -D -m 644 $pkgdir/opt/quake4/License.txt \
70         $pkgdir/usr/share/licenses/quake4/License.txt
72     # Install License (PunkBuster)
73     install -D -m 644 $pkgdir/opt/quake4/pb/PBEULA.txt \
74         $pkgdir/usr/share/licenses/quake4/PBEULA.txt
76     # Install Desktop File
77     install -D -m 644 $srcdir/quake4.desktop \
78         $pkgdir/usr/share/applications/quake4.desktop
80     # Install Icon File
81     install -D -m 644 $pkgdir/opt/quake4/q4icon.bmp \
82         $pkgdir/usr/share/pixmaps/quake4.bmp