diff --git a/main/postmarketos-ui-fbkeyboard/APKBUILD b/main/postmarketos-ui-fbkeyboard/APKBUILD index d72bf4584..552554c1c 100644 --- a/main/postmarketos-ui-fbkeyboard/APKBUILD +++ b/main/postmarketos-ui-fbkeyboard/APKBUILD @@ -1,12 +1,12 @@ # Maintainer: Ferenc Bakonyi pkgname=postmarketos-ui-fbkeyboard pkgver=1 -pkgrel=0 +pkgrel=1 pkgdesc="Plain framebuffer console with touchscreen keyboard support" url="https://github.com/bakonyiferenc/fbkeyboard" arch="all" license="GPL-3.0-or-later" -depends="fbkeyboard coreutils" +depends="fbkeyboard" install="$pkgname.post-install $pkgname.pre-deinstall $pkgname.post-upgrade" source="fbkeyboard.init" options="!check" # No tests @@ -15,4 +15,4 @@ package() { install -Dm755 "$srcdir"/fbkeyboard.init "$pkgdir"/etc/init.d/fbkeyboard } -sha512sums="386ce9bb48a75a0cbe2dd3617eaa700368d8b3a55d502a15d16415fdebbb3234893a8e0247ff63b6222017c57c1103a0922581311b9d6bbe63b2f7699ea6f15c fbkeyboard.init" +sha512sums="1341e2a4ba9187f2538f210c3c4bcd8e2e79341552391b3ce57fb2f0d9a8c99a4d7c182d82d2d8f73caea22ace25530fe42e6b16040e8aa7dc62b4e96a5db81d fbkeyboard.init" diff --git a/main/postmarketos-ui-fbkeyboard/fbkeyboard.init b/main/postmarketos-ui-fbkeyboard/fbkeyboard.init index edce07254..01dc7cea0 100644 --- a/main/postmarketos-ui-fbkeyboard/fbkeyboard.init +++ b/main/postmarketos-ui-fbkeyboard/fbkeyboard.init @@ -2,6 +2,7 @@ name="fbkeyboard" command="/usr/bin/fbkeyboard" +command_args="-r $(cat /sys/class/graphics/fbcon/rotate)" pidfile="/var/run/fbkeyboard.pid" command_background=true @@ -20,59 +21,4 @@ start_pre() "the fbkeyboard service or built in." fi fi - - ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}} - - if [ "$ttyn" = 0 ]; then - ebegin "Skipping console setup (rc_tty_number == 0)" - eend 0 - return 0 - fi - - local x= rows= retval=0 ttydev=/dev/tty - - # Set the console size to 2/3, fbkeyboard uses 1/3 - ebegin "Setting console size" - [ -d /dev/vc ] && ttydev=/dev/vc/ - x=1 - while [ $x -le $ttyn ]; do - rows=$(stty -F $ttydev$x size | awk '{print $1}') - rows=$(($rows * 2 / 3)) - if ! stty -F $ttydev$x rows $rows >/dev/null; then - retval=1 - break - fi - : $(( x += 1 )) - done - eend $retval - - return $retval -} - -stop_post() -{ - ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}} - - if [ "$ttyn" = 0 ]; then - ebegin "Skipping console setup (rc_tty_number == 0)" - eend 0 - return 0 - fi - - local x= rows= ttydev=/dev/tty - - # Reset the console size by recalculating the maximum supported rows value - ebegin "Resetting console size" - [ -d /dev/vc ] && ttydev=/dev/vc/ - x=1 - while [ $x -le $ttyn ]; do - rows=$(($(stty -F $ttydev$x size | awk '{print $1}') * 2)) - while stty -F $ttydev$x rows $rows >/dev/null 2>/dev/null ; do - rows=$(($rows * 2)) - done - until stty -F $ttydev$x rows $rows >/dev/null 2>/dev/null ; do - : $((rows--)) - done - : $(( x += 1 )) - done }