main/postmarketos-ui-fbkeyboard: restore
Restore the fbkeyboard UI package. Add me and Alexey as maintainers.
Also do some cleanup.
This reverts commit a44c9a5c8b.
Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9333>
This commit is contained in:
@@ -0,0 +1,38 @@
|
|||||||
|
# Reference: https://postmarketos.org/uipkg
|
||||||
|
# Co-Maintainer: Ferass El Hafidi <funderscore@postmarketos.org>
|
||||||
|
maintainer="Alexey Minnekhanov <alexeymin@minlexx.ru>"
|
||||||
|
pkgname=postmarketos-ui-fbkeyboard
|
||||||
|
pkgver=8
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Plain framebuffer console with touchscreen keyboard support"
|
||||||
|
url="https://github.com/bakonyiferenc/fbkeyboard"
|
||||||
|
arch="all"
|
||||||
|
license="GPL-3.0-or-later"
|
||||||
|
depends="
|
||||||
|
fbkeyboard
|
||||||
|
postmarketos-base-ui
|
||||||
|
postmarketos-base-ui-audio
|
||||||
|
postmarketos-base-ui-networkmanager
|
||||||
|
"
|
||||||
|
install="$pkgname-openrc.post-install $pkgname-openrc.pre-deinstall $pkgname-openrc.post-upgrade"
|
||||||
|
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() {
|
||||||
|
default_openrc
|
||||||
|
depends="
|
||||||
|
openrc
|
||||||
|
networkmanager-openrc
|
||||||
|
"
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
bed2c48abfac7cc9bc16fb16cd3ae3a7048121d2867b961458f0d3a9520e16598c8115a7b00808bded64904956aea445fa31a3106c52bab87cfba3420be309b8 fbkeyboard.init
|
||||||
|
5b70d6087a4448673a4f3f1868ee93f67517edcdf02a6aeec7381b9c91e43cf213a96714388b437497026188276f9c55e759c9fb75e3465422188e9cd00724c9 fbkeyboard.service
|
||||||
|
"
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
name="fbkeyboard"
|
||||||
|
command="/usr/bin/fbkeyboard"
|
||||||
|
command_args="-r $(cat /sys/class/graphics/fbcon/rotate) -f /usr/share/fonts/dejavu/DejaVuSans.ttf"
|
||||||
|
pidfile="/var/run/fbkeyboard.pid"
|
||||||
|
command_background=true
|
||||||
|
|
||||||
|
depend()
|
||||||
|
{
|
||||||
|
after consolefont
|
||||||
|
keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre()
|
||||||
|
{
|
||||||
|
# Setup kernel support for user level drivers (input subsystem)
|
||||||
|
if [ ! -e /dev/uinput ]; then
|
||||||
|
if ! modprobe -q uinput; then
|
||||||
|
eerror "The uinput module needs to be loaded by " \
|
||||||
|
"the fbkeyboard service or built in."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# save energy
|
||||||
|
echo 0 >/sys/class/graphics/fbcon/cursor_blink
|
||||||
|
}
|
||||||
@@ -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,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rc-update add fbkeyboard default
|
||||||
|
rc-update add networkmanager default
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
postmarketos-ui-fbkeyboard-openrc.post-install
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rc-update del fbkeyboard
|
||||||
Reference in New Issue
Block a user