blob: dd8b84f11cfdb05fb50424875a6826cd36337bf2 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# Maintainer: Manuel Wiesinger <m {you know what belongs here} mmap {and here} at>
_name=dymo-bluetooth
pkgname=$_name-git
pkgver=0.1.0.r9.06b61ab
pkgrel=2
pkgdesc="Use DYMO LetraTag LT-200B thermal label printer over Bluetooth in Python, without depending on its app"
arch=('any')
url="https://github.com/ysfchn/dymo-bluetooth"
license=('MIT')
depends=(
"python-barcode"
"python-bleak"
"python-pillow"
"python>=3.10"
)
makedepends=(
"git"
"python-build"
"python-installer"
"python-wheel"
)
provides=("$_name")
source=("git+${url}.git")
b2sums=('SKIP')
pkgver()
{
cd "$srcdir/$_name"
local _version
local _rev_num
local _last_commit
_version=$(grep version pyproject.toml | cut -f 2 -d '"')
_rev_num="$(git rev-list --count HEAD)"
_last_commit="$(git rev-parse --short HEAD)"
echo "${_version}.r${_rev_num}.${_last_commit}"
}
prepare() {
git -C "$srcdir/$_name" clean -dfx
}
build() {
cd "$srcdir/$_name"
python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/$_name"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
install -Dm644 assets/example_image.png -t "$pkgdir/usr/share/doc/$pkgname/examples/"
}
|