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

_pkgname=TinyFPGA-B-Series
pkgname=python-tinyfpgab-git
pkgver=r80.e8f9150
pkgrel=1
pkgdesc="Programmer for the TinyFPGA B2 boards"
arch=(any)
url="https://github.com/tinyfpga/TinyFPGA-B-Series"
license=('GPL')
depends=('python' 'python-pyserial')
makedepends=('git' 'python-setuptools')
checkdepends=('python-pytest')
provides=("${pkgname%%-git}")
conflicts=("${pkgname%%-git}")
source=("git+$url.git")

sha256sums=('SKIP')

pkgver() {
	cd "$_pkgname"

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

build() {
	cd "$_pkgname/programmer"

	python setup.py build
}

check() {
	cd "$_pkgname/programmer"

	pytest test.py
}

package() {
	cd "$_pkgname/programmer"

	python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}