summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/fbsplash
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-02-12 08:22:14 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-02-12 08:22:14 (GMT)
commit40727c47f4a6319dc101ca97cddd72732db03889 (patch)
treec469bd876c58981ef4abd517af7af7f6c8f8868a /abs/core-testing/fbsplash
parentd39d6198243375c7cc8e72aa926d24fc6b625982 (diff)
downloadlinhes_pkgbuild-40727c47f4a6319dc101ca97cddd72732db03889.zip
linhes_pkgbuild-40727c47f4a6319dc101ca97cddd72732db03889.tar.gz
linhes_pkgbuild-40727c47f4a6319dc101ca97cddd72732db03889.tar.bz2
Initial inclusion of fbsplash and deps.
Diffstat (limited to 'abs/core-testing/fbsplash')
-rw-r--r--abs/core-testing/fbsplash/PKGBUILD54
-rw-r--r--abs/core-testing/fbsplash/extra/encrypt_hook.patch24
-rw-r--r--abs/core-testing/fbsplash/fbsplash.conf8
-rw-r--r--abs/core-testing/fbsplash/fbsplash.daemon56
-rw-r--r--abs/core-testing/fbsplash/fbsplash.initcpio_install29
-rw-r--r--abs/core-testing/fbsplash/fbsplash.inithooks91
-rw-r--r--abs/core-testing/fbsplash/fbsplash.install33
-rw-r--r--abs/core-testing/fbsplash/splash-functions-arch.sh71
8 files changed, 366 insertions, 0 deletions
diff --git a/abs/core-testing/fbsplash/PKGBUILD b/abs/core-testing/fbsplash/PKGBUILD
new file mode 100644
index 0000000..eec0284
--- /dev/null
+++ b/abs/core-testing/fbsplash/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Greg Helton <gt@fallendusk.org>
+
+pkgname=fbsplash
+pkgver=1.5.4.3
+pkgrel=3
+pkgdesc="A userspace implementation of a splash screen for Linux (formerly known as gensplash)"
+arch=('i686' 'x86_64')
+url="http://fbsplash.berlios.de"
+license=('GPL')
+backup=('etc/conf.d/fbsplash.conf')
+makedepends=('klibc')
+depends=('initscripts' 'miscsplashutils' 'libjpeg' 'libpng' 'freetype2-static' 'gpm' 'libmng')
+conflicts=('bootsplash' 'gensplash')
+install=fbsplash.install
+source=(http://download.berlios.de/fbsplash/splashutils-${pkgver}.tar.bz2 \
+ http://code.thewrecker.net/files/darch.tar.bz2 \
+ fbsplash.inithooks \
+ splash-functions-arch.sh \
+ fbsplash.conf \
+ fbsplash.initcpio_install \
+ fbsplash.daemon)
+md5sums=('c722cd4148817b9c50381d9bdc1ea6ef'
+ '4ea33e99330abf4a9a468ac8c0ba48ca'
+ '44375e92025ce07b3434773efb282127'
+ '8ffb29400a2518b16f3dbca653855268'
+ 'b1b45761b2a5899a4fe8255fc9cfaf9c'
+ '5cce2373181193207d105e150a7f371c'
+ '9f876244d6b09c96cf1543a1b47d6525')
+
+build() {
+ cd ${startdir}/src/splashutils-${pkgver}
+
+ # Configure, make, and install
+ ./configure --prefix=/usr --sysconfdir=/etc --enable-fbcondecor --with-gpm --with-mng --with-png --with-ttf --with-ttf-kernel
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+
+ # Create directories
+ mkdir -p ${startdir}/pkg/lib/splash/cache
+ mkdir -p ${startdir}/pkg/etc/splash
+ mkdir -p ${startdir}/pkg/etc/rc.d/functions.d
+
+ # Install scripts
+ install -D -m644 ${startdir}/src/fbsplash.initcpio_install ${startdir}/pkg/lib/initcpio/install/fbsplash
+ install -D -m644 ${startdir}/src/fbsplash.conf ${startdir}/pkg/etc/conf.d/fbsplash.conf
+ install -D -m744 ${startdir}/src/fbsplash.daemon ${startdir}/pkg/etc/rc.d/fbsplash
+ install -D -m744 ${startdir}/src/splash-functions-arch.sh ${startdir}/pkg/sbin/splash-functions-arch.sh
+
+ # install darch fbsplash theme
+ cp -r ${startdir}/src/darch ${startdir}/pkg/etc/splash/darch
+
+ # install initscripts hooks
+ install -D -m744 ${startdir}/src/fbsplash.inithooks ${startdir}/pkg/etc/rc.d/functions.d/fbsplash.sh
+}
diff --git a/abs/core-testing/fbsplash/extra/encrypt_hook.patch b/abs/core-testing/fbsplash/extra/encrypt_hook.patch
new file mode 100644
index 0000000..f059048
--- /dev/null
+++ b/abs/core-testing/fbsplash/extra/encrypt_hook.patch
@@ -0,0 +1,24 @@
+--- /lib/initcpio/hooks/encrypt 2008-09-12 12:29:38.000000000 -0400
++++ encrypt.1 2008-10-28 08:13:34.000000000 -0400
+@@ -1,6 +1,7 @@
+ # vim: set ft=sh:
+ # TODO this one needs some work to work with lots of different
+ # encryption schemes
++. /sbin/splash-functions.sh
+ run_hook ()
+ {
+ /sbin/modprobe -a -q dm-crypt >/dev/null 2>&1
+@@ -59,6 +60,7 @@ run_hook ()
+ fi
+ fi
+ # Ask for a passphrase
++ splash_verbose
+ if [ ${dopassphrase} -gt 0 ]; then
+ echo ""
+ echo "A password is required to access the ${cryptname} volume:"
+@@ -119,4 +121,5 @@ run_hook ()
+ fi
+ nuke ${ckeyfile}
+ fi
++ splash_silent
+ }
diff --git a/abs/core-testing/fbsplash/fbsplash.conf b/abs/core-testing/fbsplash/fbsplash.conf
new file mode 100644
index 0000000..331f684
--- /dev/null
+++ b/abs/core-testing/fbsplash/fbsplash.conf
@@ -0,0 +1,8 @@
+#
+# fbsplash.conf
+#
+
+THEMES="darch"
+SPLASH_TTYS="1 2 3 4 5 6"
+
+#EOF \ No newline at end of file
diff --git a/abs/core-testing/fbsplash/fbsplash.daemon b/abs/core-testing/fbsplash/fbsplash.daemon
new file mode 100644
index 0000000..29e5755
--- /dev/null
+++ b/abs/core-testing/fbsplash/fbsplash.daemon
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+source /etc/rc.conf
+source /etc/rc.d/functions
+
+source /sbin/splash-functions.sh
+source /etc/conf.d/fbsplash.conf
+
+case "$1" in
+ start)
+ if [ "$(fbcondecor_supported)" = "true" ]
+ then
+ THEME="darch"
+ if [ -f /proc/cmdline ]; then
+ OPTIONS=$(grep -o 'splash=[^ ]*' /proc/cmdline)
+ for i in $(echo "${OPTIONS#*=}" | sed -e 's/,/ /g')
+ do
+ case ${i%:*} in
+ theme) THEME=${i#*:} ;;
+ esac
+ done
+ fi
+ stat_busy "Setting fbcondecor console images"
+ for TTY in ${SPLASH_TTYS}; do
+ fbcondecor_set_theme ${TTY} ${THEME}
+ done
+ stat_done
+ fi
+ save_boot_steps
+ splash_exit
+ ;;
+
+ kill)
+ if [ "$(fbcondecor_supported)" = "true" ]
+ then
+ stat_busy "Disabling fbcondecor console images"
+ for TTY in ${SPLASH_TTYS}; do
+ fbcondecor_remove_theme ${TTY}
+ done
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 kill
+ sleep 1
+ $1 start
+ ;;
+
+ *)
+ echo "usage: $0 {start|restart|kill}"
+esac
+exit 0
+
+#EOF
+
diff --git a/abs/core-testing/fbsplash/fbsplash.initcpio_install b/abs/core-testing/fbsplash/fbsplash.initcpio_install
new file mode 100644
index 0000000..06700a8
--- /dev/null
+++ b/abs/core-testing/fbsplash/fbsplash.initcpio_install
@@ -0,0 +1,29 @@
+
+install() {
+ [ -x /sbin/fbcondecor_helper ] || return 1
+
+ source /etc/conf.d/fbsplash.conf
+ [ -z "${THEME}" ] && THEME="darch"
+
+ add_binary "/sbin/fbcondecor_helper"
+
+ add_device "/dev/null" c 1 3
+ add_device "/dev/console" c 5 1
+ add_device "/dev/tty0" c 4 0
+
+ for DIR in /dev /dev/fb /dev/misc /dev/vc /lib/splash/proc /lib/splash/sys
+ do
+ add_dir ${DIR}
+ done
+
+ for THEME in ${THEMES}
+ do
+ add_full_dir "/etc/splash/${THEME}"
+ done
+}
+
+help() {
+ echo "This hook includes Fbsplash in the initramfs image."
+}
+
+#EOF
diff --git a/abs/core-testing/fbsplash/fbsplash.inithooks b/abs/core-testing/fbsplash/fbsplash.inithooks
new file mode 100644
index 0000000..dbf7b13
--- /dev/null
+++ b/abs/core-testing/fbsplash/fbsplash.inithooks
@@ -0,0 +1,91 @@
+# fbsplash function.d script #
+# Author: Greg Helton <gt@fallendusk.org> #
+
+# Who is calling? #
+CALLER=$0
+
+# splash stuff #
+. /etc/conf.d/fbsplash.conf
+. /sbin/splash-functions.sh
+
+# Redefine the stat functions #
+stat_bkgd() {
+ printf "${C_OTHER}${PREFIX_REG} ${C_MAIN}${1}${C_CLEAR} "
+ deltext
+ printf " ${C_OTHER}[${C_BKGD}BKGD${C_OTHER}]${C_CLEAR} "
+}
+
+stat_busy() {
+ printf "${C_OTHER}${PREFIX_REG} ${C_MAIN}${1}${C_CLEAR} "
+ printf "${SAVE_POSITION}"
+ deltext
+ printf " ${C_OTHER}[${C_BUSY}BUSY${C_OTHER}]${C_CLEAR} "
+ # This checks to see if we just brought up the lo interface in rc.sysinit #
+ # if so, start the progress bar #
+ if [ "${1}" == 'Bringing up loopback interface' ]; then
+ splash rc_init
+ fi
+ # Load variables #
+ var_load STEP_NR MAX_STEPS RC_MULTI RC_SYSINIT RC_SHUTDOWN
+ # Only update the splash progress if we're in sysinit, multi, or shutdown. #
+ if [[ ${SPLASH_RC_MULTI} == 1 || ${SPLASH_RC_SYSINIT} == 1 || ${SPLASH_RC_SHUTDOWN} == 1 ]]; then
+ ((SPLASH_STEP_NR++))
+ SPLASH_PROGRESS=$((100*${SPLASH_STEP_NR}/${SPLASH_MAX_STEPS}))
+ SPLASH_CURRENT_PROGRESS=${SPLASH_PROGRESS}
+ splash_update_progress ${SPLASH_PROGRESS}
+ var_save STEP_NR CURRENT_PROGRESS
+ fi
+ if [ ${SPLASH_RC_SHUTDOWN} == 1 ]; then
+ save_shutdown_steps
+ fi
+
+}
+
+stat_done() {
+ deltext
+ printf " ${C_OTHER}[${C_DONE}DONE${C_OTHER}]${C_CLEAR} \n"
+}
+
+stat_fail() {
+ deltext
+ printf " ${C_OTHER}[${C_FAIL}FAIL${C_OTHER}]${C_CLEAR} \n"
+ splash_verbose
+}
+
+start_daemon() {
+ /etc/rc.d/$1 start
+}
+
+# rc.sysinit #
+if [ $CALLER == '/etc/rc.sysinit' ]; then
+ echo "fbsplash: Setting up splash..."
+ splash_cache_prep
+ SPLASH_MAX_STEPS=$(load_boot_steps)
+ SPLASH_STEP_NR=0
+ SPLASH_RC_MULTI=0
+ SPLASH_RC_SYSINIT=1
+ SPLASH_RC_SHUTDOWN=0
+ var_save MAX_STEPS STEP_NR RC_MULTI RC_SYSINIT RC_SHUTDOWN
+fi
+
+# rc.multi #
+if [ $CALLER == '/etc/rc.multi' ]; then
+ SPLASH_RC_MULTI=1
+ SPLASH_RC_SYSINIT=0
+ var_save RC_MULTI RC_SYSINIT
+fi
+
+# rc.shutdown #
+if [ $CALLER == '/etc/rc.shutdown' ]; then
+ echo "fbsplash: Setting up splash..."
+ splash_cache_prep
+ SPLASH_MAX_STEPS=$(load_shutdown_steps)
+ SPLASH_SHUTDOWN_STEPS=1
+ SPLASH_STEP_NR=0
+ SPLASH_RC_MULTI=0
+ SPLASH_RC_SYSINIT=0
+ SPLASH_RC_SHUTDOWN=1
+ var_save MAX_STEPS STEP_NR RC_MULTI RC_SYSINIT RC_SHUTDOWN DAEMON_STEPS
+ splash rc_init
+fi
+
diff --git a/abs/core-testing/fbsplash/fbsplash.install b/abs/core-testing/fbsplash/fbsplash.install
new file mode 100644
index 0000000..4ef95b6
--- /dev/null
+++ b/abs/core-testing/fbsplash/fbsplash.install
@@ -0,0 +1,33 @@
+
+post_install() {
+ echo ">"
+ echo "> ATTENTION!!!:"
+ echo "----------------------------------------------"
+ echo "> fbsplash has been rewritten and no longer depends "
+ echo "> on using a special initscripts. "
+ echo "> Please read http://wiki.archlinux.org/fbsplash "
+ echo "> for more details on the changes. "
+ echo "----------------------------------------------"
+ if ! [ -e /etc/conf.d/fbsplash.bootsteps ]; then
+ echo ""
+ echo "Creating step count files..."
+ echo "Note: The first boot's percentage will be wrong. "
+ echo "The scripts will update with the right steps after first boot"
+ echo ""
+ touch /etc/conf.d/fbsplash.bootsteps
+ touch /etc/conf.d/fbsplash.shutdownsteps
+ echo 20 > /etc/conf.d/fbsplash.bootsteps
+ echo 10 > /etc/conf.d/fbsplash.shutdownsteps
+ fi
+
+}
+
+post_upgrade() {
+ post_install
+}
+
+op=$1
+shift
+$op $*
+
+#EOF
diff --git a/abs/core-testing/fbsplash/splash-functions-arch.sh b/abs/core-testing/fbsplash/splash-functions-arch.sh
new file mode 100644
index 0000000..977ccef
--- /dev/null
+++ b/abs/core-testing/fbsplash/splash-functions-arch.sh
@@ -0,0 +1,71 @@
+# ArchLinux specific splash functions #
+# Author: Greg Helton <gt@fallendusk.org> #
+
+splash_init() {
+ splash_setup
+ splash_start
+}
+
+splash_exit() {
+ splash_comm_send "exit"
+ splash_cache_cleanup
+}
+
+splash_update_progress() {
+ local PROGRESS
+ PROGRESS=$(($1*65535/100))
+ splash_comm_send "progress ${PROGRESS}"
+ splash_comm_send "repaint"
+}
+
+var_save() {
+for i in $@ ;
+ do
+ local var
+ eval var=\$SPLASH_${i}
+ echo "SPLASH_$i=$(echo ${var})" > ${spl_cachedir}/${i}
+ done
+}
+
+var_load() {
+for i in $@ ;
+ do
+ local var
+ eval var=\$SPLASH_${i}
+ if [[ -z "$(echo ${var})" && -f ${spl_cachedir}/${i} ]] ; then
+ source ${spl_cachedir}/${i}
+ fi
+ done
+}
+
+save_boot_steps() {
+ var_load STEP_NR
+ echo $SPLASH_STEP_NR > /etc/conf.d/fbsplash.bootsteps
+}
+
+load_boot_steps() {
+ BOOT_STEPS=$(cat /etc/conf.d/fbsplash.bootsteps)
+ # Fail safe, so we don't divide by 0
+ if [ $BOOT_STEPS = 0 ]; then
+ BOOT_STEPS=1
+ fi
+ printf $BOOT_STEPS
+}
+
+save_shutdown_steps() {
+ var_load SHUTDOWN_STEPS
+ ((SPLASH_SHUTDOWN_STEPS++))
+ echo $SPLASH_SHUTDOWN_STEPS > /etc/conf.d/fbsplash.shutdownsteps
+ var_save SHUTDOWN_STEPS
+}
+
+load_shutdown_steps() {
+ SHUTDOWN_STEPS=$(cat /etc/conf.d/fbsplash.shutdownsteps)
+ # Fail safe, so we don't divide by 0
+ if [ $SHUTDOWN_STEPS = 0 ]; then
+ SHUTDOWN_STEPS=1
+ fi
+ printf $SHUTDOWN_STEPS
+}
+
+# EOF #