blob: e02179fce6a52a4591e2d23b2a75a4c6ecafaeec (
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
|
# Maintainer: gardar <aur@gardar.net>
_pkgname=cc2538-bsl
pkgname=python-$_pkgname
pkgver=2.1.r87.gbb64711
pkgrel=1
pkgdesc="Script to communicate with Texas Instruments CC13xx/CC2538/CC26xx Serial Boot Loader."
arch=('any')
url="https://github.com/JelmerT/$_pkgname"
license=('BSD')
depends=('python-pyserial')
makedepends=('python-build' 'python-setuptools-scm' 'git' 'mandown')
optdepends=('python-magic' 'python-intelhex')
source=("git+https://github.com/JelmerT/$_pkgname.git")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/$_pkgname"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "$srcdir/$_pkgname"
mandown README.md > "$_pkgname.1"
sed -n '/Copyright/,/ DAMAGE./p' "$_pkgname.py" > LICENSE
}
build() {
cd "$srcdir/$_pkgname"
python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/$_pkgname"
install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm 644 "$_pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1"
python -m installer --destdir="$pkgdir" dist/*.whl
}
|