main/postmarketos-ui-fbkeyboard: support systemd (MR 6065)
Add service file and systemd subpackage. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
This commit is contained in:
parent
69bdedc45a
commit
099ecb99eb
4 changed files with 47 additions and 4 deletions
|
|
@ -1,8 +1,8 @@
|
|||
# Reference: https://postmarketos.org/uipkg
|
||||
# Maintainer: Ferenc Bakonyi <bakonyi.ferenc@gmail.com>
|
||||
pkgname=postmarketos-ui-fbkeyboard
|
||||
pkgver=3
|
||||
pkgrel=2
|
||||
pkgver=4
|
||||
pkgrel=0
|
||||
pkgdesc="Plain framebuffer console with touchscreen keyboard support"
|
||||
url="https://github.com/bakonyiferenc/fbkeyboard"
|
||||
arch="all"
|
||||
|
|
@ -13,12 +13,13 @@ depends="
|
|||
postmarketos-base-ui
|
||||
postmarketos-base-ui-networkmanager
|
||||
"
|
||||
subpackages="$pkgname-openrc"
|
||||
source="fbkeyboard.init"
|
||||
subpackages="$pkgname-openrc $pkgname-systemd"
|
||||
source="fbkeyboard.init fbkeyboard.service"
|
||||
options="!check" # No tests
|
||||
|
||||
package() {
|
||||
install -Dm755 "$srcdir"/fbkeyboard.init "$pkgdir"/etc/init.d/fbkeyboard
|
||||
install -Dm644 "$srcdir"/fbkeyboard.service "$pkgdir"/usr/lib/systemd/system/fbkeyboard.service
|
||||
}
|
||||
|
||||
openrc() {
|
||||
|
|
@ -31,6 +32,12 @@ openrc() {
|
|||
mkdir -p "$subpkgdir"
|
||||
}
|
||||
|
||||
systemd() {
|
||||
install="$subpkgname.post-install $subpkgname.pre-deinstall"
|
||||
default_systemd
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
bed2c48abfac7cc9bc16fb16cd3ae3a7048121d2867b961458f0d3a9520e16598c8115a7b00808bded64904956aea445fa31a3106c52bab87cfba3420be309b8 fbkeyboard.init
|
||||
5b70d6087a4448673a4f3f1868ee93f67517edcdf02a6aeec7381b9c91e43cf213a96714388b437497026188276f9c55e759c9fb75e3465422188e9cd00724c9 fbkeyboard.service
|
||||
"
|
||||
|
|
|
|||
16
main/postmarketos-ui-fbkeyboard/fbkeyboard.service
Normal file
16
main/postmarketos-ui-fbkeyboard/fbkeyboard.service
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=Framebuffer keyboard UI service
|
||||
ConditionPathExists=/dev/tty0
|
||||
After=getty@tty1.service
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
ExecStart=/bin/sh -c "exec /usr/bin/fbkeyboard -r $(cat /sys/class/graphics/fbcon/rotate) -f /usr/share/fonts/dejavu/DejaVuSans.ttf"
|
||||
ExecStartPre=-modprobe uinput
|
||||
ExecStartPre=-/bin/sh -c "echo 0 > /sys/class/graphics/fbcon/cursor_blink"
|
||||
Restart=always
|
||||
RestartSec=1s
|
||||
PIDFile=/run/fbkeyboard.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This file is forcefully included into CI shellcheck by:
|
||||
# $(find . -path './main/postmarketos-ui-*/*.post-install')
|
||||
# in .ci/shellcheck.sh. Silence it here to avoid error:
|
||||
# SC1091 (info): Not following: /usr/lib/systemd/systemd-apk-macros.sh:
|
||||
# openBinaryFile: does not exist (No such file or directory)
|
||||
# shellcheck disable=SC1091
|
||||
. /usr/lib/systemd/systemd-apk-macros.sh
|
||||
systemd_service_post_install system fbkeyboard
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This file is forcefully included into CI shellcheck by:
|
||||
# $(find . -path './main/postmarketos-ui-*/*.pre-deinstall')
|
||||
# in .ci/shellcheck.sh. Silence it here to avoid error:
|
||||
# SC1091 (info): Not following: /usr/lib/systemd/systemd-apk-macros.sh:
|
||||
# openBinaryFile: does not exist (No such file or directory)
|
||||
# shellcheck disable=SC1091
|
||||
. /usr/lib/systemd/systemd-apk-macros.sh
|
||||
systemd_service_pre_deinstall system fbkeyboard
|
||||
Loading…
Add table
Add a link
Reference in a new issue