summaryrefslogtreecommitdiff
path: root/community/sauerbraten/PKGBUILD
blob: ed3520ba68f6c48fca30e501618f529ebe14e6ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# $Id: PKGBUILD 75284 2012-08-17 21:27:10Z lcarlier $
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
# Contributor: Roman Kyrylych <Roman.Kyrylych@gmail.com>
# Contributor: Christoph Siegenthaler <csi@gmx.ch>
# Contributor: Jesse Young <jesse@eon.jlyo.org>

pkgname=sauerbraten
pkgver=2010_07_28_justice_edition
pkgrel=5
pkgdesc="FPS that uses an improved version of the Cube engine"
arch=('i686' 'x86_64')
url="http://www.sauerbraten.org/"
license=('ZLIB')
makedepends=('sdl_mixer' 'sdl_image' 'libgl' 'mesa' 'gendesk')
install=sauerbraten.install
backup=('etc/conf.d/sauerbraten')
source=(http://downloads.sourceforge.net/$pkgname/${pkgname}_${pkgver}_linux.tar.bz2
	sauerbraten-client
	sauerbraten-server
	sauerbraten.confd
	sauerbraten.rcd
	sauerbraten.png
	sauerbraten.install
	sauerbraten.service
	license.txt
	fix-indirect-linking.diff)
md5sums=('0947cb37b628873063270be1fcce27f6'
         'ac66ef9e80d6fc1b4b047df1c36c07c0'
         '4a42c314d01ccdc4c76fad38d18c7434'
         '8e26aeba1ef178c24e22723d3c48d7e1'
         'e0a2e0679c34b39623964ee68e6fae1e'
         '3e602f421f7342cf8c3ed16314523d6f'
         '2f7b423f49491359ff776a91414db4d8'
         '3c964cdd0906461c0404641b1eb52d96'
         'cf46cd0148f03b7477f7c54aec865abe'
         'a9a9b658affd933ad354be45da998354')
_exec=('sauerbraten-client %u')

build() {
  cd "$srcdir"
  gendesk
  
  cd "$pkgname/src"

  patch -Np1 -i ../../fix-indirect-linking.diff

  make

  # remove cvs directories
  find ${srcdir}/$pkgname -type d -name CVS -exec rm -rf '{}' \; 2> /dev/null
}

package() {
  depends=('sdl_mixer' 'sdl_image' 'libgl' 'sauerbraten-data')

  cd ${srcdir}/$pkgname/src

  make DESTDIR="${pkgdir}" install

  cd ..
  install -D bin_unix/native_client ${pkgdir}/opt/sauerbraten/bin/linux_client
  install -D bin_unix/native_server ${pkgdir}/opt/sauerbraten/bin/linux_server

  install -Dm755 ${srcdir}/sauerbraten-client ${pkgdir}/usr/bin/sauerbraten-client
  install -Dm755 ${srcdir}/sauerbraten-server ${pkgdir}/usr/sbin/sauerbraten-server
  install -Dm644 ${srcdir}/sauerbraten.confd ${pkgdir}/etc/conf.d/sauerbraten
  install -Dm755 ${srcdir}/sauerbraten.rcd ${pkgdir}/etc/rc.d/sauerbraten
  install -Dm644 ${srcdir}/sauerbraten.service ${pkgdir}/usr/lib/systemd/system/sauerbraten.service
  install -Dm644 ${srcdir}/sauerbraten.desktop ${pkgdir}/usr/share/applications/sauerbraten.desktop
  install -Dm644 ${srcdir}/sauerbraten.png ${pkgdir}/usr/share/pixmaps/sauerbraten.png
  install -Dm644 ${srcdir}/license.txt ${pkgdir}/usr/share/licenses/sauerbraten/license.txt
}