summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e7ff9c0bd3b00800c27174f1e914a78b9f16ee16 (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
# Maintainer: Lone_Wolf <Lone_Wolf@klaas-de-kat.nl> 
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: sausageandeggs <s_stoakley at hotmail.co.uk>

pkgname=singularity-git
_pkgname=singularity
pkgver=r1980.fa07970
pkgrel=1
pkgdesc="Strategy game - simulation of true AI, git version"
arch=('any')
url="http://emhsoft.com/singularity/index.html"
license=('GPL2' 'custom')
depends=('python-pygame' 'python-numpy' 'python-polib')
makedepends=('git' 'python-setuptools')
conflicts=('singularity')
source=(  "git+https://github.com/singularity/singularity"
                "git+https://github.com/singularity/singularity-music.git"
)
md5sums=('SKIP' 'SKIP')

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

build() {
    cd $_pkgname
    python setup.py build
}

package() {
  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
  cd $_pkgname

  python setup.py install --root="$pkgdir" --optimize=1 --skip-build

  # music
  cp -R "$srcdir"/singularity-music/music  "$pkgdir"/$site_packages/singularity/music
  
  
  # desktop file
  install -Dm644 singularity.desktop "$pkgdir"/usr/share/applications/singularity.desktop

  # license: code is GPL2, but data & music fall under other licenses
  install -Dm644 README.txt "$pkgdir"/usr/share/doc/$pkgname/README.txt
  mkdir -p "$pkgdir"/usr/share/licenses/$pkgname/
  install -m644 LICENSE.* "$pkgdir"/usr/share/licenses/$pkgname/
}