summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7b6b1807515b3c788a1cd3ff96fbcec279c5cc95 (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
# Maintainer: Max Zhao <alcasa dot mz at gmail dot com>
# Contributor: Leonard K├Ânig <leonard.r.koenig at googlemail dot com>

pkgname='endless-sky'
pkgver=0.9.8
pkgrel=1
arch=('i686' 'x86_64')
url="http://endless-sky.github.io/"
# libpng and libgl are already fetched by sdl2
# xdg-utils for icon cache
depends=('sdl2' 'libjpeg-turbo' 'glew' 'openal' 'hicolor-icon-theme' 'xdg-utils' 'libmad')
makedepends=('git' 'scons')
license=('GPL3' 'CCPL' 'custom:public domain')
pkgdesc="A space exploration and combat game similar to Escape Velocity"
install=${pkgname}.install
source=(
"https://github.com/endless-sky/endless-sky/archive/v${pkgver}.tar.gz"
        "${pkgname}.install")

md5sums=('7e5be32a89834d47fca216ab81a1f2ca'
         '737bc185c599447d4eef7c215dabecc9')
#
# PKGEXT='.pkg.tar'
#

build() {
	cd $pkgname-$pkgver
	scons
  # gzip manpage
  gzip -f endless-sky.6
}


package() {
	cd $pkgname-$pkgver
	# Install executables
	install -D --mode=755 endless-sky ${pkgdir}/usr/bin/endless-sky

  # resources
  ## They explicitly want this path. Although one could workaround with '-r' param
  install --directory ${pkgdir}/usr/share/games/${pkgname}
  cp -rf data images sounds ${pkgdir}/usr/share/games/${pkgname}/
  install -D --mode=644 credits.txt ${pkgdir}/usr/share/games/${pkgname}/credits.txt
  install -D --mode=644 keys.txt ${pkgdir}/usr/share/games/${pkgname}/keys.txt

  # icons and .desktop
  _idir=endless-sky.iconset
  _iddir=${pkgdir}/usr/share/icons/hicolor

  install -D --mode=644 icons/icon_16x16.png ${_iddir}/16x16/apps/${pkgname}.png
  install -D --mode=644 icons/icon_22x22.png ${_iddir}/22x22/apps/${pkgname}.png
  install -D --mode=644 icons/icon_24x24.png ${_iddir}/24x24/apps/${pkgname}.png
  install -D --mode=644 icons/icon_32x32.png ${_iddir}/32x32/apps/${pkgname}.png
  install -D --mode=644 icons/icon_48x48.png ${_iddir}/48x48/apps/${pkgname}.png
  install -D --mode=644 icons/icon_256x256.png ${_iddir}/256x256/apps/${pkgname}.png
  install -D --mode=644 endless-sky.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop

  # manpage
  install -D --mode=644 endless-sky.6.gz ${pkgdir}/usr/share/man/man6/${pkgname}.6.gz

  # copyright
  install -D --mode=644 copyright ${pkgdir}/usr/share/licenses/${pkgname}/copyright
}

# vim:set ts=2 sw=2 et: