summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 97431a69faed77cb49899abd3dfca212ebe8f677 (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
# Maintainer: dreieck

_pkgname=normalmap
pkgname="${_pkgname}-git"
pkgver=r20.20200602.fb90c69
pkgrel=1
pkgdesc="Allows to create a RGB normal map from a heightmap. The output picture is RGBA and you can store various combination of the height in the Alpha channel."
arch=(
  'i686'
  'x86_64'
)
url="https://github.com/eatdust/normalmap"
license=('GPL2')
depends=(
  'imagemagick>=7'
)
makedepends=(
  'git'
  'waf'
)
optdepends=()
provides=(
  "${_pkgname}=${pkgver}"
)
conflicts=(
  "${_pkgname}"
)
source=(
  "${_pkgname}::git+git://github.com/eatdust/normalmap.git"
)
sha256sums=(
  'SKIP'
)

pkgver() {
  cd "${srcdir}/${_pkgname}"
  _rev="$(git rev-list HEAD --count)"
  _date="$(git log -1 --format=%cd --date=format:%Y%m%d)"
  _hash="$(git rev-parse --short HEAD)"
  printf '%s' "r${_rev}.${_date}.${_hash}"
}

build() {
  cd "${srcdir}/${_pkgname}"
  printf '%s\n' "${url}" > "upstream.url"

  PREFIX=/usr waf configure
  waf build
}

package() {
  cd "${srcdir}/${_pkgname}"

  DESTDIR="${pkgdir}" waf install

  for _docfile in upstream.url README.md; do
    install -D -v -m644 "${_docfile}" "${pkgdir}/usr/share/doc/${_pkgname}/${_docfile}"
  done

  install -D -v -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
  ln -svr "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" "${pkgdir}/usr/share/doc/${_pkgname}/COPYING"
}