Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=kdebump.git;a=commitdiff;h=2cbbd8e48b01f7a80da4d58e07916fa66a6c14e7
commit 2cbbd8e48b01f7a80da4d58e07916fa66a6c14e7 Author: James Buren <[email protected]> Date: Thu Dec 13 20:22:49 2012 -0600 fbterm-1.7.0-3-x86_64 * import initial changes to perform tests for fbterm as a getty replacement diff --git a/source/apps-extra/fbterm/FrugalBuild b/source/apps-extra/fbterm/FrugalBuild index 978dbce..62b2ad0 100644 --- a/source/apps-extra/fbterm/FrugalBuild +++ b/source/apps-extra/fbterm/FrugalBuild @@ -5,21 +5,34 @@ pkgname=fbterm pkgver=1.7.0 pkgrel=3 pkgdesc="A terminal emulator that runs in the framebuffer." +rodepends=('font-misc-misc' 'fbv') depends=('fontconfig' 'zlib' 'libstdc++' 'ncurses') -[ "$CARCH" != "ppc" ] && depends=(${depends[@]} 'libx86') groups=('apps-extra') archs=('i686' 'x86_64') Finclude googlecode _F_cd_path="$pkgname-1.7" -source=(${source[@]} $pkgname-bi) +backup=(etc/fbtermrc) +source=(${source[@]} fbtermrc fbterm-prepare-screen fbterm-wrapper fbterm-login fbterm-restore-screen getty\@.service) sha1sums=('dc7b7ff29212c1551f35bf7a50967454d3b8c67c' \ - '90e8ff21bac81ae364809d0e6101ed07c4a72b06') + 'cd0030fc3acf1209068fc738e116f86717054e27' \ + '4f9f134f61b2931e4f924c71cc828ee630ca2f1b' \ + 'c204fa25553998da1af6a425b1e12a1900e5cc56' \ + 'de1606d260f25dac64799be3e8f575f31c6fd6fc' \ + '4ba3babedb541d272047ab44255cdac8de1e1f45') -build() { +build() +{ Fbuild TERMINFO=$Fdestdir/usr/share/terminfo tic terminfo/$pkgname || Fdie - Fexe /usr/bin/$pkgname-bi - chmod u+s $Fdestdir/usr/bin/fbterm || Fdie + Fmkdir /root + Fdirschmod /root 0710 + Fln /etc/fbtermrc /root/.fbtermrc + Ffile /etc/fbtermrc + Fexe /usr/libexec/fbterm-prepare-screen + Fexe /usr/libexec/fbterm-wrapper + Fexe /usr/libexec/fbterm-login + Fexe /usr/libexec/fbterm-restore-screen + Ffile /etc/systemd/system/getty\@.service } # optimization OK diff --git a/source/apps-extra/fbterm/README.Frugalware b/source/apps-extra/fbterm/README.Frugalware index 6395a48..c0e6a81 100644 --- a/source/apps-extra/fbterm/README.Frugalware +++ b/source/apps-extra/fbterm/README.Frugalware @@ -1,3 +1 @@ -To use fbterm, your user needs to be a member of the video group. - -To use a background image, install the fbv package and run fbterm-bi. +To configure fbterm, please edit /etc/fbtermrc. diff --git a/source/apps-extra/fbterm/fbterm-bi b/source/apps-extra/fbterm/fbterm-bi deleted file mode 100644 index 19511d5..0000000 --- a/source/apps-extra/fbterm/fbterm-bi +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -/usr/bin/pacman-g2 -Qi fbv &> /dev/null - -if [ $? -ne 0 ]; then - echo "The fbv package must be installed to use this command." - exit 1 -fi - -if [ -x $1 ]; then - echo "Usage: $0 <image path> <fbterm flags>" - exit 1 -fi - -echo -ne "\033[?25l" - -fbv -ciuker "$1" << EOF -q -EOF - -shift - -export FBTERM_BACKGROUND_IMAGE=1 - -exec fbterm "$@" diff --git a/source/apps-extra/fbterm/fbterm-login b/source/apps-extra/fbterm/fbterm-login new file mode 100644 index 0000000..773a482 --- /dev/null +++ b/source/apps-extra/fbterm/fbterm-login @@ -0,0 +1,17 @@ +#!/bin/sh + +if [ -z "$FBTERM_TTY" ]; then + echo '$FBTERM_TTY is not set.' + exit 1 +fi + +if [ ! -c "$FBTERM_TTY" ]; then + echo "$FBTERM_TTY does not exist." + exit 1 +fi + +if [ -f /etc/issue ]; then + cat < /etc/issue 2>&1 | sed "s|\\l|${FBTERM_TTY/\/dev\//}|g" > "$FBTERM_TTY" 2>&1 +fi + +exec login < "$FBTERM_TTY" > "$FBTERM_TTY" 2>&1 diff --git a/source/apps-extra/fbterm/fbterm-prepare-screen b/source/apps-extra/fbterm/fbterm-prepare-screen new file mode 100644 index 0000000..0ca5dbd --- /dev/null +++ b/source/apps-extra/fbterm/fbterm-prepare-screen @@ -0,0 +1,28 @@ +#!/bin/sh + +if [ -z "$FBTERM_TTY" ]; then + echo '$FBTERM_TTY is not set.' + exit 1 +fi + +if [ ! -c "$FBTERM_TTY" ]; then + echo "$FBTERM_TTY does not exist." + exit 1 +fi + +# Clear the entire screen. +echo -ne "\e[2J" < "$FBTERM_TTY" > "$FBTERM_TTY" 2>&1 + +# Move cursor to top-left corner of screen. +echo -ne "\e[H" < "$FBTERM_TTY" > "$FBTERM_TTY" 2>&1 + +# Disable cursor display. +echo -ne "\e[?25l" < "$FBTERM_TTY" > "$FBTERM_TTY" 2>&1 + +# Set the background image if it is defined and exists. +if [ -f /etc/fbtermbg ]; then + FBTERM_BACKGROUND=$(cat /etc/fbtermbg 2>&1) + if [ -f "$FBTERM_BACKGROUND" ]; then + echo "q" 2>&1 | fbv -c -u -i -k -e -r "$FBTERM_BACKGROUND" < "$FBTERM_TTY" > "$FBTERM_TTY" 2>&1 + fi +fi diff --git a/source/apps-extra/fbterm/fbterm-restore-screen b/source/apps-extra/fbterm/fbterm-restore-screen new file mode 100644 index 0000000..4a429aa --- /dev/null +++ b/source/apps-extra/fbterm/fbterm-restore-screen @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -z "$FBTERM_TTY" ]; then + echo '$FBTERM_TTY is not set.' + exit 1 +fi + +if [ ! -c "$FBTERM_TTY" ]; then + echo "$FBTERM_TTY does not exist." + exit 1 +fi + +# Enable cursor display. +echo -ne "\e[?25h" < "$FBTERM_TTY" > "$FBTERM_TTY" 2>&1 diff --git a/source/apps-extra/fbterm/fbterm-wrapper b/source/apps-extra/fbterm/fbterm-wrapper new file mode 100644 index 0000000..c40b8d9 --- /dev/null +++ b/source/apps-extra/fbterm/fbterm-wrapper @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ -z "$FBTERM_TTY" ]; then + echo '$FBTERM_TTY is not set.' + exit 1 +fi + +if [ ! -c "$FBTERM_TTY" ]; then + echo "$FBTERM_TTY does not exist." + exit 1 +fi + +if [ -f /etc/fbtermbg ]; then + FBTERM_BACKGROUND=$(cat /etc/fbtermbg 2>&1) + if [ -f "$FBTERM_BACKGROUND" ]; then + export FBTERM_BACKGROUND_IMAGE=1 + fi +fi + +exec fbterm "$@" -- /usr/libexec/fbterm-login < "$FBTERM_TTY" > "$FBTERM_TTY" 2>&1 diff --git a/source/apps-extra/fbterm/fbtermrc b/source/apps-extra/fbterm/fbtermrc new file mode 100644 index 0000000..c70990e --- /dev/null +++ b/source/apps-extra/fbterm/fbtermrc @@ -0,0 +1,45 @@ +# Configuration for FbTerm + +# Lines starting with '#' are ignored. +# Note that end-of-line comments are NOT supported, comments must be on a line of their own. + +# font family names/pixelsize used by fbterm, multiple font family names must be seperated by ',' +# and using a fixed width font as the first is strongly recommended +font-names=Monospace +font-size=12 + +# force font width (and/or height), usually for non-fixed width fonts +# legal value format: n (fw_new = n), +n (fw_new = fw_old + n), -n (fw_new = fw_old - n) +#font-width= +#font-height= + +# default color of foreground/background text +# available colors: 0 = black, 1 = red, 2 = green, 3 = brown, 4 = blue, 5 = magenta, 6 = cyan, 7 = white +color-foreground=7 +color-background=0 + +# max scroll-back history lines of every window, value must be [0 - 65535], 0 means disable it +history-lines=1000 + +# up to 5 additional text encodings, multiple encodings must be seperated by ',' +# run 'iconv --list' to get available encodings. +text-encodings= + +# cursor shape: 0 = underline, 1 = block +# cursor flash interval in milliseconds, 0 means disable flashing +cursor-shape=0 +cursor-interval=500 + +# additional ascii chars considered as part of a word while auto-selecting text, except ' ', 0-9, a-z, A-Z +word-chars=._- + +# change the clockwise orientation angle of screen display +# available values: 0 = 0 degree, 1 = 90 degrees, 2 = 180 degrees, 3 = 270 degrees +screen-rotate=0 + +# specify the favorite input method program to run +input-method= + +# treat ambiguous width characters as wide +# warning: causes rendering issues in some cases. +#ambiguous-wide=yes diff --git a/source/apps-extra/fbterm/[email protected] b/source/apps-extra/fbterm/[email protected] new file mode 100644 index 0000000..df04095 --- /dev/null +++ b/source/apps-extra/fbterm/[email protected] @@ -0,0 +1,28 @@ +[Unit] +Description=Framebuffer Terminal on %I +Documentation=man:fbterm(1) +After=systemd-user-sessions.service +After=plymouth-quit-wait.service +After=local.service +Before=getty.target +IgnoreOnIsolate=yes +ConditionPathExists=/dev/tty0 + +[Service] +Environment=FBTERM_TTY=/dev/%I +ExecStartPre=/usr/libexec/fbterm-prepare-screen +ExecStart=/usr/libexec/fbterm-wrapper +ExecStopPost=/usr/libexec/fbterm-restore-screen +Type=idle +Restart=always +RestartSec=0 +TTYPath=/dev/%I +TTYReset=yes +TTYVHangup=yes +TTYVTDisallocate=yes +KillMode=process +IgnoreSIGPIPE=no +KillSignal=SIGHUP + +[Install] +Alias=getty.target.wants/[email protected] _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
