summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aef4ad97fb4e32f050091217e11715b653dd20f7 (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
# Maintainer: xiretza <xiretza+aur@xiretza.xyz>
# Contributor: Nicola Corna <nicola@corna.info>

_pkgname=python-pyghdl
pkgname=$_pkgname-git
pkgver=3.0.0.r193.97df73f72
pkgrel=1
pkgdesc='Python binding for GHDL and high-level APIs'
arch=('any')
url='https://github.com/ghdl/ghdl'
license=('GPL2')

provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
replaces=('pyghdl-git')
depends=('ghdl-git' 'python' 'python-pyattributes' 'python-pytooling' 'python-pyvhdlmodel')
makedepends=('python-setuptools' 'git')
checkdepends=('python-pytest')

source=('ghdl::git+https://github.com/ghdl/ghdl.git')
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/ghdl"
  printf "%s" "$(git describe --long | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
  cd "$srcdir/ghdl"
  python setup.py build
}

check() {
  cd "$srcdir/ghdl"

  env PYTHONPATH="$PWD" pytest testsuite/pyunit
}

package() {
  cd "$srcdir/ghdl"
  python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
}

# vim: set et ts=2: