summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9609e037a62545a3651fbc589b373656672d7266 (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
# Maintainer: Nicola Corna <nicola@corna.info>

_pkgname=python-pyghdl
pkgname=$_pkgname-git
pkgver=1.0.0.r495.cfa7ec61
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-pymetaclasses' 'python-pyterminalui' 'python-pydecor' '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: