summaryrefslogtreecommitdiff
path: root/community/sauerbraten/PKGBUILD
blob: 2a845e88d6d9716e1c83da73791e0aeffa307807 (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
74
75
76
77
78
79
80
81
82
# $Id: PKGBUILD 27049 2010-09-16 22:45:06Z 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>

pkgbase=sauerbraten
pkgname=('sauerbraten' 'sauerbraten-data')
pkgver=2010_07_28_justice_edition
pkgrel=2
pkgdesc="Improved version of the Cube engine"
arch=('i686' 'x86_64')
url="http://www.sauerbraten.org/"
license=('ZLIB')
depends=('sdl_mixer' 'sdl_image' 'libgl')
makedepends=('mesa')
install=sauerbraten.install
source=(http://downloads.sourceforge.net/$pkgname/${pkgname}_${pkgver}_linux.tar.bz2
	sauerbraten-client
	sauerbraten-server
	sauerbraten.confd
	sauerbraten.rcd
	sauerbraten.desktop
	sauerbraten.png
	sauerbraten.install
	license.txt)
md5sums=('0947cb37b628873063270be1fcce27f6'
         'ac66ef9e80d6fc1b4b047df1c36c07c0'
         '4a42c314d01ccdc4c76fad38d18c7434'
         '8e26aeba1ef178c24e22723d3c48d7e1'
         'e0a2e0679c34b39623964ee68e6fae1e'
         '5b528424ed46e05124420975d99370e5'
         '3e602f421f7342cf8c3ed16314523d6f'
         '2f7b423f49491359ff776a91414db4d8'
         'cf46cd0148f03b7477f7c54aec865abe')

build() {
  cd ${srcdir}/$pkgname/src

  make

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

package_sauerbraten() {
  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.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
}

package_sauerbraten-data() {
  pkgdesc="Improved version of the Cube engine - datas files"
  arch=('any')
  depends=()

  cd ${srcdir}/sauerbraten

  install -d ${pkgdir}/opt/sauerbraten
  cp -r data ${pkgdir}/opt/sauerbraten
  cp -r packages ${pkgdir}/opt/sauerbraten

  # make namcap happy
  chmod -R go+rx ${pkgdir}/opt/sauerbraten/packages/argh

  install -Dm644 ${srcdir}/license.txt ${pkgdir}/usr/share/licenses/${pkgname}-data/license.txt
}