updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / savage-xr / PKGBUILD
blob3de4e94b60567abbc724eb02d750ab285441d82f
1 # Maintainer: Stanislav GE <ginermail@gmail.com>
2 # Contributor: Baptiste Jonglez <zerstorer@free.fr>
4 pkgname=savage-xr
5 pkgver=1.0rc3
6 pkgrel=1
7 pkgdesc="The Linux Client for the game Savage XR"
8 arch=('i686' 'x86_64')
9 url=http://www.newerth.com
10 license=('custom: "Unknown"')
11 install=savage-xr.install
12 if [ "$CARCH" = "x86_64" ]; then
13     depends=('lib32-sdl' 'lib32-mesa' 'lib32-pcre')
14 else
15     depends=('sdl' 'mesa' 'pcre')
17 source=("xr_setup-$pkgver-cl_lin_prod.bin::http://www.newerth.com/?id=downloads&op=downloadFile&file=xr_setup-$pkgver-cl_lin_prod.bin&mirrorid=3"
18         "savage-xr.desktop"
19         "savage-xr-editor.desktop")
20 md5sums=('3dbe7041cd13e2d74e55ad4367178061'
21          'b03a2a0f072d8360fc2eeac9a8000462'
22          '998bb912dffe9a90e98fc7efb0f42f02')
24 build() {
25     # Create destination directory
26     install -d $pkgdir/opt/savage-xr
28     # Extract game from the installer
29     chmod +x $srcdir/xr_setup-${pkgver}-cl_lin_prod.bin
30     $srcdir/xr_setup-${pkgver}-cl_lin_prod.bin --mode silent --prefix $pkgdir/opt/savage-xr
33 # Note that we must have a 'package' function in order not to use fakeroot
34 # on the 'build' function (which makes the savage installer fail)
36 package () {
37     # Create destination directory
38     install -d $pkgdir/usr/bin
40     # Install the game launcher
41     ln -s /opt/savage-xr/savage.sh $pkgdir/usr/bin/savage-xr.sh
43     # Install desktop file (Game Client)
44     install -D -m 644 $srcdir/savage-xr.desktop $pkgdir/usr/share/applications/savage-xr.desktop
46     # Install desktop file (Map Editor)
47     install -D -m 644 $srcdir/savage-xr-editor.desktop $pkgdir/usr/share/applications/savage-xr-editor.desktop
49     # Install icon
50     install -D -m 644 $pkgdir/opt/savage-xr/icon.xpm $pkgdir/usr/share/pixmaps/savage-xr.xpm
52     # Change group of the game folder to 'games'
53     chown -R :games $pkgdir/opt/savage-xr
54     chmod -R g+rwX $pkgdir/opt/savage-xr