summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 75588623e82f26280820f2c8974916cc0f1f1ae7 (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
# Maintainer: Mike Swanson <mikeonthecomputer@gmail.com>
# Contributor: Buce <dmbuce@gmail.com>
# Contributor: Duncan Bain <duncanjbain@gmail.com>
# Contributor: Maxwell Pray a.k.a. Synthead <synthead@gmail.com>

_pkgname=Minecraft-Overviewer
pkgname=(${_pkgname,,}{,-docs}-git)
pkgver=0.15.0.r2.751ba39b
pkgrel=1
pkgdesc="Render large resolution images of a Minecraft map with a web UI"
arch=('x86_64' 'i686')
url="https://github.com/overviewer/${_pkgname}"
license=('GPL3')
depends=('python' 'python-pillow' 'python-numpy')
makedepends=('git' 'python-sphinx')
conflicts=('minecraft-overviewer')
provides=('minecraft-overviewer')
source=("git+https://github.com/overviewer/${_pkgname}.git")
sha256sums=('SKIP')

pkgver() {
  cd "${_pkgname}"
  local version="$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
  printf "%s" "${version#v}"
}

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

  cd ./docs
  make html
}

package_minecraft-overviewer-git() {
  cd "${_pkgname}"
  python "setup.py" install --prefix=/usr --root="$pkgdir"
}

package_minecraft-overviewer-docs-git() {
  arch=('any')
  depends=()
  cd "${_pkgname}/docs/_build/html"

  install -d "$pkgdir/usr/share/doc/${_pkgname,,}/html"
  cp -r -t "$pkgdir/usr/share/doc/${_pkgname,,}/html" -- *
}