console/*: add initial support for TTY keyboard (!858)
Signed-off-by: Danct12 <danct12@disroot.org>
This commit is contained in:
parent
ac8c78c00d
commit
efd8c6cde2
6 changed files with 153 additions and 0 deletions
29
console/console-keyboard-basic/APKBUILD
Normal file
29
console/console-keyboard-basic/APKBUILD
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Contributor: Danct12 <danct12@disroot.org>
|
||||
# Maintainer: Danct12 <danct12@disroot.org>
|
||||
pkgname="console-keyboard-basic"
|
||||
pkgver=0_git20200104
|
||||
pkgrel=0
|
||||
pkgdesc="A basic console keyboard"
|
||||
arch="all"
|
||||
url="https://github.com/Daniel-Abrecht/console-keyboard-basic"
|
||||
license="GPL-3.0-or-later"
|
||||
options="!check" # no testsuite
|
||||
depends="console-keyboard-multiplexer"
|
||||
makedepends="ncurses-dev libconsolekeyboard-dev"
|
||||
|
||||
# Source
|
||||
_commit="005fd482e9423b5d45743f098e52ba25255bffc0"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/Daniel-Abrecht/$pkgname/archive/$_commit.tar.gz
|
||||
"
|
||||
builddir="$srcdir/$pkgname-$_commit"
|
||||
|
||||
build() {
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
make install-all DESTDIR="$pkgdir"
|
||||
ln -sf /usr/bin/console-keyboard-basic $pkgdir/usr/bin/console-keyboard
|
||||
}
|
||||
sha512sums="6e4ffbfa6f44a2a7a90e7bafc3944e5c34c007ae9c9ab0d7cd26930422af9fb381ece6e4357b4bd2568d319393491130e880ebc0861c729fff482c02cce0114e console-keyboard-basic-005fd482e9423b5d45743f098e52ba25255bffc0.tar.gz"
|
32
console/console-keyboard-multiplexer/APKBUILD
Normal file
32
console/console-keyboard-multiplexer/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Contributor: Danct12 <danct12@disroot.org>
|
||||
# Maintainer: Danct12 <danct12@disroot.org>
|
||||
pkgname="console-keyboard-multiplexer"
|
||||
pkgver=0_git20200104
|
||||
pkgrel=0
|
||||
pkgdesc="An on screen keyboard for terminals"
|
||||
arch="all"
|
||||
url="https://github.com/Daniel-Abrecht/console-keyboard-multiplexer"
|
||||
install="$pkgname.post-install"
|
||||
license="AGPL-3.0-or-later"
|
||||
options="!check" # no testsuite
|
||||
depends="libconsolekeyboard kbd terminus-font"
|
||||
makedepends="libconsolekeyboard-dev libttymultiplex-dev libexecinfo-dev"
|
||||
|
||||
# Source
|
||||
_commit="e304969224ba79cdac9e6715fd329a8af278cc33"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/Daniel-Abrecht/$pkgname/archive/$_commit.tar.gz
|
||||
ckmvt
|
||||
"
|
||||
builddir="$srcdir/$pkgname-$_commit"
|
||||
|
||||
build() {
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
make install-bin DESTDIR="$pkgdir"
|
||||
cp -f $srcdir/ckmvt $pkgdir/usr/bin/ckmvt
|
||||
}
|
||||
sha512sums="be8e3a892409ee316ee0478c7d46249ab5eefffaffbe11215f593beab2b0da5ae24392e407748a50d567eaffb9cdcd847e24f077030447fb4753470bc75b8cf4 console-keyboard-multiplexer-e304969224ba79cdac9e6715fd329a8af278cc33.tar.gz
|
||||
1c56ec846de906ec63446aa07cb40d0e64c7e609e5756497aa63fef6b3b071d0f098071e42450e973b6a7bad670771b1c680e5788b987b852c471d074f909ac1 ckmvt"
|
24
console/console-keyboard-multiplexer/ckmvt
Executable file
24
console/console-keyboard-multiplexer/ckmvt
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
# as for right now, it seems that postmarketOS runs without any color :(
|
||||
export TERM=linux
|
||||
|
||||
nr="$(printf "%s" "$1" | /bin/sed 's/^tty//')"; shift
|
||||
|
||||
case "$nr" in
|
||||
*[!0-9]*)
|
||||
echo "Usage: $0 vtnumber"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
tty="$(tty)"
|
||||
|
||||
if [ "$(tty)" != "/dev/tty$nr" ]
|
||||
then exec /sbin/getty -n -l "$0" 38400 "tty$nr" linux
|
||||
fi
|
||||
|
||||
# nicer font (requires terminus-font to be installed)
|
||||
setfont /usr/share/consolefonts/ter-u24b.psf.gz
|
||||
|
||||
exec /usr/bin/console-keyboard-multiplexer -w : -l "CKM$nr" -- login
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo -e "\n\nTo run getty with keyboard on startup, you'll need to edit /etc/inittab"
|
||||
echo -e "For example, you want the keyboard on tty1, this is how the entry should be:\n"
|
||||
echo -e "tty1::respawn:/usr/bin/ckmvt 1\n\n"
|
28
console/libconsolekeyboard/APKBUILD
Normal file
28
console/libconsolekeyboard/APKBUILD
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Contributor: Danct12 <danct12@disroot.org>
|
||||
# Maintainer: Danct12 <danct12@disroot.org>
|
||||
pkgname="libconsolekeyboard"
|
||||
pkgver=1.0.0_git20191011
|
||||
pkgrel=0
|
||||
pkgdesc="A terminal multiplexer library"
|
||||
arch="all"
|
||||
url="https://github.com/Daniel-Abrecht/console-keyboard-multiplexer/tree/libconsolekeyboard"
|
||||
license="LGPL-3.0-or-later"
|
||||
subpackages="$pkgname-dev"
|
||||
options="!check" # fails without a proper devfs
|
||||
|
||||
# Source
|
||||
_commit="73611fa86c8a4c375102a4251cb795b30758e32b"
|
||||
source="
|
||||
console-keyboard-multiplexer-$_commit.tar.gz::https://github.com/Daniel-Abrecht/console-keyboard-multiplexer/archive/$_commit.tar.gz
|
||||
"
|
||||
builddir="$srcdir/console-keyboard-multiplexer-$_commit"
|
||||
|
||||
build() {
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
make install DESTDIR="$pkgdir"
|
||||
}
|
||||
|
||||
sha512sums="3f2bd8aa62489068b02e4ac985a69a84ad12a59beabecca0a5a8cc0faba4250ff34e81be9d3dde8861bf9907f7137bea976e036eec286e0fe0bfdb2505e1f0ba console-keyboard-multiplexer-73611fa86c8a4c375102a4251cb795b30758e32b.tar.gz"
|
35
console/libttymultiplex/APKBUILD
Normal file
35
console/libttymultiplex/APKBUILD
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Contributor: Danct12 <danct12@disroot.org>
|
||||
# Maintainer: Danct12 <danct12@disroot.org>
|
||||
pkgname="libttymultiplex"
|
||||
pkgver=0.0.1_git20200204
|
||||
pkgrel=0
|
||||
pkgdesc="A terminal multiplexer library"
|
||||
arch="all"
|
||||
url="https://github.com/Daniel-Abrecht/libttymultiplex"
|
||||
license="MIT AND AGPL-3.0-or-later"
|
||||
depends="ncurses"
|
||||
makedepends="bash ncurses-dev"
|
||||
subpackages="$pkgname-dev"
|
||||
|
||||
options="!check" # fails without a proper devfs
|
||||
|
||||
# Source
|
||||
_commit="91dfd9c6de24314977dd537d25b82cdb994e96ec"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/Daniel-Abrecht/$pkgname/archive/$_commit.tar.gz
|
||||
"
|
||||
builddir="$srcdir/$pkgname-$_commit"
|
||||
|
||||
build() {
|
||||
make -j1 # workaround for ld issues
|
||||
}
|
||||
|
||||
package() {
|
||||
make install DESTDIR="$pkgdir"
|
||||
}
|
||||
|
||||
check() {
|
||||
make test
|
||||
}
|
||||
|
||||
sha512sums="955c48003b5612616c40afe2f832a7a0035afd71602a161d71c34d80c886215211185f6a3e13382d235b2936f2459cda105d2c2438c1f750d63de9e7d9304143 libttymultiplex-91dfd9c6de24314977dd537d25b82cdb994e96ec.tar.gz"
|
Loading…
Reference in a new issue