summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7017e3e7aaf06458b4b0b617afddc23d0b866d00 (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
# Maintainer: skint007 <archlinux.repose742@passmail.net>
pkgname=clipboard-typer
pkgver=0.3.1
pkgrel=1
pkgdesc="Type clipboard contents keystroke-by-keystroke into the active window"
arch=('any')
url="https://github.com/skint007/key-sender"
license=('MIT')
depends=(
    'python>=3.12'
    'python-pynput'
    'python-pyperclip'
    'pyside6'
)
makedepends=(
    'python-build'
    'python-installer'
    'python-wheel'
    'python-hatchling'
)
checkdepends=(
    'python-pytest'
    'python-pytest-mock'
)
optdepends=(
    'python-pystray: system tray icon support'
    'python-pillow: system tray icon support'
    'ydotool: Wayland keystroke backend (recommended for KDE/GNOME)'
    'wtype: Wayland keystroke backend (requires compositor support)'
    'xdotool: X11 keystroke backend'
    'wl-clipboard: clipboard access on Wayland'
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('SKIP')

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

check() {
    cd "$pkgname-$pkgver"
    PYTHONPATH="$PWD/src" python -m pytest
}

package() {
    cd "$pkgname-$pkgver"
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    install -Dm644 clipboard-typer.service "$pkgdir/usr/lib/systemd/user/$pkgname.service"
}