summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 177882bf3a88f09aaf5f19d579f524d02b167256 (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: Alex Forencich <alex@alexforencich.com>
pkgname=python-myhdl-git
pkgver=0.11.r14.ga4708fa
pkgrel=1
pkgdesc="a Python-Based Hardware Description Language"
arch=('any')
url="http://www.myhdl.org/"
license=('LGPL')
makedepends=('git' 'python-sphinx' 'python-setuptools')
depends=('python' 'iverilog')
provides=('python-myhdl')
conflicts=('python-myhdl')

_gitroot='https://github.com/myhdl/myhdl.git'
_gitname='myhdl'

source=("$_gitname::git+$_gitroot")
md5sums=('SKIP')

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

build() {
  cd "$srcdir/$_gitname"
  
  cd $srcdir/$_gitname/doc
  PYTHONPATH=$srcdir/$_gitname make man
  
  cd $srcdir/$_gitname/cosimulation/icarus
  make
}

package() {
  cd "$srcdir/$_gitname"
  python setup.py install --prefix=/usr --root="$pkgdir/" --optimize=1
  
  install -m 0644 -D ./LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE.txt
  install -m 0644 -D ./doc/build/man/myhdl.1 $pkgdir/usr/share/man/man1/myhdl.1
  install -m 0755 -D ./cosimulation/icarus/myhdl.vpi $pkgdir/usr/lib/ivl/myhdl.vpi
}