summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3d9fad5cbb646d70eb71f9039e42eefb2080b2ee (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
# Maintainer: Jonas Malaco <jonas@protocubo.io>
# Contributor: Alex Forencich <alex@alexforencich.com>
pkgname=python-pyusb-git
pkgver=1.1.1.r6.g6bd82d9
pkgrel=1
pkgdesc="USB access for Python"
arch=('any')
url="https://github.com/pyusb/pyusb"
license=('BSD')
depends=('python' 'libusb')
makedepends=('git' 'python-setuptools' 'python-setuptools-scm')
provides=('python-pyusb')
conflicts=('python-pyusb')

_gitroot='https://github.com/pyusb/pyusb'
_gitname='pyusb'

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

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

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

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