summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5c8ed3bbdfb61eea629044002d37bba2a805c232 (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: Christopher Arndt <aur -at- chrisarndt -dot- de>

_pkgname=faustpp
pkgname="$_pkgname-git"
pkgver=v1.0.0.r0.g110ba5d
pkgrel=1
pkgdesc='A post-processor for FAUST DSP code (git version)'
arch=(any)
url='https://github.com/jpcima/faustpp'
license=(Boost)
depends=(python-jinja)
makedepends=(git python-build python-installer python-wheel)
provides=($_pkgname)
conflicts=($_pkgname)
source=("$_pkgname::git+https://github.com/jpcima/$_pkgname.git")
md5sums=('SKIP')


pkgver() {
  cd $_pkgname
  ( set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "%s.r%s.%s" \
      "$(grep ^version setup.cfg | cut -d ' ' -f 3)" \
      "$(git rev-list --count HEAD)" \
      "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd $_pkgname
  python -m build --wheel --no-isolation
}

package() {
  cd $_pkgname
  python -m installer --destdir="$pkgdir" dist/*.whl

  # license
  install -Dm644 LICENSE* -t "$pkgdir"/usr/share/licenses/$pkgname
  install -Dm644 docs/manual/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-manual
  install -Dm644 docs/manual/LICENSE.* -t "$pkgdir"/usr/share/licenses/$pkgname
  # documentation
  install -Dm644 docs/manual/en/manual.* -t "$pkgdir"/usr/share/doc/$pkgname/
  # examples
  install -Dm644 examples/* -t "$pkgdir"/usr/share/doc/$pkgname/examples
}

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