summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6c00d3512e985ae48b1fc618afc7dfd072b109c2 (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
# Maintainer: hasardeur <paragon dot pictures at rocketmail dot com>
# Contributor: Michael DeGuzis <mdeguzis@gmail.com>
# Contributor: Arkham <arkham at archlinux dot us>

pkgname=darkplaces-git
_gitname=darkplaces
pkgver=r10521.a678225e
pkgrel=1
pkgdesc="An advanced Quake 1 game engine (git-latest)"
arch=('i686' 'x86_64')
url="https://github.com/xonotic/darkplaces.git"
license=('GPL2')
depends=('hicolor-icon-theme' 'libjpeg-turbo' 'sdl2' 'zlib' 'glibc' 'libx11')
makedepends=('xorgproto' 'git')
conflicts=('darkplaces')
provides=('darkplaces')
install=$pkgname.install
source=('git+https://github.com/xonotic/darkplaces.git'
        'darkplaces.desktop')
sha256sums=('SKIP'
            '476f513f85da873ce93c89f2078bf9c2ea244e3e13a19c6ab02e818ddf221c37')

pkgver() {

  cd $_gitname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {

  cd $srcdir/$_gitname

  # Make sure Darkplaces is not compiled with -j > 1.
  MAKEFLAGS="${MAKEFLAGS} -j$(nproc)"
  make OPTIM_RELEASE="${CFLAGS}" DP_FS_BASEDIR=/usr/share/games/quake release

}

package() {

  cd $srcdir/$_gitname
  install -d $pkgdir/usr/bin
  install -m755 darkplaces-{dedicated,sdl} $pkgdir/usr/bin

  for i in 16 24 32 48 64 72; do
    install -Dm644 darkplaces${i}x${i}.png $pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/darkplaces.png
  done

  install -Dm644 $srcdir/darkplaces.desktop $pkgdir/usr/share/applications/$pkgname.desktop

}