summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 277faca26cc2e2cc3037fa083269cc335cfc661c (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
# Maintainer: xiretza <xiretza+aur@xiretza.xyz>

pkgname=ghdl-yosys-plugin-git
pkgver=r180.db40ae6
pkgrel=1
arch=('x86_64')
pkgdesc='VHDL synthesis (based on ghdl and yosys)'
url='https://github.com/ghdl/ghdl-yosys-plugin'
license=('GPL3')

provides=("${pkgname%%-git}")
conflicts=("${pkgname%%-git}")
makedepends=('git')
depends=('ghdl-git' 'yosys-git')

source=("git://github.com/ghdl/ghdl-yosys-plugin.git")
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/ghdl-yosys-plugin"

	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "${srcdir}/ghdl-yosys-plugin"

	make ghdl.so
}

package() {
	cd "${srcdir}/ghdl-yosys-plugin"

	install -Dm755 ghdl.so "$pkgdir/usr/lib/ghdl_yosys.so"

	install -dm755 "$pkgdir/$(yosys-config --datdir)/plugins/"
	ln -s /usr/lib/ghdl_yosys.so "$pkgdir/$(yosys-config --datdir)/plugins/ghdl.so"

	install -dm755 "$pkgdir/usr/share/ghdl/yosys-plugin/examples/"
	cp -r examples/* "$pkgdir/usr/share/ghdl/yosys-plugin/examples/"
}