summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2f6ab75f3abc94255cea747d3ce9df0a714b7232 (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
pkgname=python-usbtmc
pkgver=0.8
pkgrel=2
pkgdesc="A Python USBTMC driver for controlling instruments over USB."
arch=('x86_64')
url="https://github.com/python-ivi/python-usbtmc"
license=(MIT)
depends=(
python-pyusb
)
makedepends=(
python-build
python-installer
python-wheel
)
install=python-usbtmc.install

source=(
"python-usbtmc-${pkgver}.tar.gz::https://github.com/python-ivi/python-usbtmc/archive/v${pkgver}.tar.gz"
python-usbtmc.sysusers
)
sha256sums=('dc13aa4ae0c0e4545e2ef83ae181d08528de176ee1522e6d66856449cf91c491'
            '3813bed7349a402231d291fe747cbe4b535081b8d39c33427701983a6bf08074')

build(){
    cd python-usbtmc-${pkgver}

    python -m build --wheel --no-isolation
}

package(){
    cd python-usbtmc-${pkgver}

    python -m installer --destdir="${pkgdir}" dist/*.whl

    install -Dm 644 "${srcdir}"/python-usbtmc.sysusers "${pkgdir}"/usr/lib/sysusers.d/python-usbtmc.conf
    install -m 0644 -D usbtmc.rules "${pkgdir}"/etc/udev/rules.d/40-usbtmc.rules
    msg2 "Users might need to be added to the the usbtmc group to avoid permissions issues"
}