summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2d7a6a5cd682699dde125a3fc2e19f3723b1a76c (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: David Runge <dvzrv@archlinux.org>

_name=pc-ble-driver-py
pkgname=python-pc-ble-driver-py
pkgver=0.17.0
pkgrel=2
pkgdesc="Serialization library over serial port providing bindings for nrf-ble-driver"
arch=(x86_64)
url="https://github.com/NordicSemiconductor/pc-ble-driver-py"
license=(custom)
depends=(gcc-libs glibc pc-ble-driver python-cryptography python-wrapt)
makedepends=(cmake ninja python-build python-installer python-scikit-build python-setuptools python-wheel swig)
# no sdist tarballs on pypi.org: https://github.com/NordicSemiconductor/pc-ble-driver-py/issues/185
# source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
source=(
  $_name-$pkgver.tar.gz::https://github.com/NordicSemiconductor/pc-ble-driver-py/archive/refs/tags/v$pkgver.tar.gz
  $pkgname-0.17.0-build_deps.patch
)
sha256sums=('1e9ef5c1d994bc12aef0c5a325beb6845cb31a9c70c0bcb0e2639c19b6e689f5'
            'dddbdeaffeb7c4c3cbc399199157b108965f19b29c985ae4ef0f262a95865ad9')
b2sums=('923503b0b1eebe9e39c74bb1b0a0ef9a070f6f25f51d7728df844a5c7bd9a23f454da08b7f4873f364b914e1052ccfeed3488464d8b7a05145c7a0a959c9346f'
        'caa70040fd664546b53e7ad481b41d1e910c4cfdb00f5e9f89306c0ba6ad9823d8e520adc9a04bc607c01c316940600bb4f3444bd50c5a5e87f312895f688050')

prepare() {
  # we do not need tox, cmake or ninja as build tools
  patch -Np1 -d $_name-$pkgver -i ../$pkgname-0.17.0-build_deps.patch
}

build() {
  cd $_name-$pkgver
  python -m build --wheel --no-isolation
}

# NOTE: tests can not be run: https://github.com/NordicSemiconductor/pc-ble-driver-py/issues/225

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}