blob: 5017ce24494953d579114d537d121e4a4e6f0c10 (
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
59
60
61
62
63
64
65
66
67
68
69
|
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=normcap
_app_id="eu.dynobo.$pkgname"
pkgver=0.5.9
pkgrel=1
pkgdesc="OCR powered screen-capture tool to capture information instead of images"
arch=('any')
url="https://dynobo.github.io/normcap"
license=('AGPL-3.0-or-later AND MIT')
depends=(
'hicolor-icon-theme'
'leptonica'
'libnotify'
'pyside6'
'python-jeepney'
'python-pytesseract'
)
makedepends=(
'python-babel'
'python-build'
'python-hatchling'
'python-installer'
'python-toml'
'python-wheel'
)
checkdepends=(
# 'appstream'
'desktop-file-utils'
)
optdepends=(
'qt6-wayland: Required in Wayland sessions'
'wl-clipboard: clipboard access for Wayland'
'xclip: clipboard access for Xorg'
'xsel: alternative Xorg clipboard handler'
)
source=("$pkgname-$pkgver.tar.gz::https://github.com/dynobo/normcap/archive/refs/tags/v$pkgver.tar.gz"
"${_app_id}.desktop")
sha256sums=('599763feea6deb805d649452b9393dbb8b63120c26d17a6a74c3b29f36a54f75'
'29992fdb19773faa7582e44fe4394d4772984d5b7b9b7b347617c387f0a260f9')
build() {
cd "$pkgname-$pkgver"
python -m build --wheel --no-isolation
}
check() {
cd "$pkgname-$pkgver"
# appstreamcli validate --no-net bundle/metainfo
desktop-file-validate "$srcdir/${_app_id}.desktop"
}
package() {
cd "$pkgname-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
for icon_size in 16 32 64 128 256 512; do
install -Dm644 bundle/imgs/$pkgname-${icon_size}.png \
"$pkgdir/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps/$pkgname.png"
done
install -Dm644 "bundle/imgs/$pkgname.svg" -t \
"$pkgdir/usr/share/icons/hicolor/scalable/apps/"
# install -Dm644 bundle/metainfo \
# "$pkgdir/usr/share/metainfo/${_app_id}.metainfo.xml"
install -Dm644 "$srcdir/${_app_id}.desktop" -t \
"$pkgdir/usr/share/applications/"
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}
|