diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 46 |
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c45204dce6a5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = winbond-kbdbl-git + pkgdesc = Manage color profiles and backlight of Winbond based keyboard (Tyrfing V2, ZET Blade, etc.) + pkgver = 1.1 + pkgrel = 1 + url = https://github.com/brainrom/winbond-kbdbl + arch = i686 + arch = x86_64 + license = MIT + makedepends = git + depends = python-pyusb + depends = python-colour + source = git+https://github.com/brainrom/winbond-kbdbl + sha256sums = SKIP + +pkgname = winbond-kbdbl-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8abb31cf69a5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Ilya Chelyadin <ilya77105@gmail.com> + +pkgname=winbond-kbdbl-git +pkgver=1.1 +pkgrel=1 +pkgdesc='Manage color profiles and backlight of Winbond based keyboard (Tyrfing V2, ZET Blade, etc.)' +arch=('i686' 'x86_64') +url="https://github.com/brainrom/winbond-kbdbl" +license=('MIT') +depends=('python-pyusb' 'python-colour') +makedepends=('git') +source=('git+https://github.com/brainrom/winbond-kbdbl') +sha256sums=('SKIP') + +build() { + cat <<-'EOF' > ./winbond-kbdbl@.service + [Unit] + Description=Allow user access to keyboard backlight + After=graphical.target + + [Service] + User=%i + WorkingDirectory=/usr/lib/winbond-kbdbl + ExecStart=env DISPLAY=:0 /usr/bin/python3 -m kbdbl -d + + Restart=on-failure + RestartSec=10s + + EOF + + cat <<-'EOF' > ./winbond-kbdbl.sh + #!/bin/bash + cd /usr/lib/winbond-kbdbl + /usr/bin/python3 -m kbdbl "$@" + EOF +} + +package(){ + cd "$srcdir" + mkdir -p "$pkgdir/usr/lib/winbond-kbdbl/kbdbl" + mkdir -p "$pkgdir/usr/lib/udev/rules.d/" + install -m 0644 winbond-kbdbl/kbdbl/* "$pkgdir/usr/lib/winbond-kbdbl/kbdbl" + install -m 0644 winbond-kbdbl/utils/50-winbondkbd-userlevel.rules "$pkgdir/usr/lib/udev/rules.d/" + install -D -m 0644 winbond-kbdbl@.service "$pkgdir/usr/lib/systemd/system/winbond-kbdbl@.service" + install -D -m 0755 winbond-kbdbl.sh "$pkgdir/usr/bin/winbond-kbdbl" + } |