lcd4linux: add lcd4linux, a daemon that can put info on your (character) LCD, like...
authorKoen Kooi <koen@openembedded.org>
Wed, 28 May 2008 18:52:59 +0000 (18:52 +0000)
committerKoen Kooi <koen@openembedded.org>
Wed, 28 May 2008 18:52:59 +0000 (18:52 +0000)
packages/lcd4linux/.mtn2git_empty [new file with mode: 0644]
packages/lcd4linux/files/.mtn2git_empty [new file with mode: 0644]
packages/lcd4linux/files/lcd4linux.init [new file with mode: 0644]
packages/lcd4linux/lcd4linux_0.10.0.bb [new file with mode: 0644]

diff --git a/packages/lcd4linux/.mtn2git_empty b/packages/lcd4linux/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/lcd4linux/files/.mtn2git_empty b/packages/lcd4linux/files/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/lcd4linux/files/lcd4linux.init b/packages/lcd4linux/files/lcd4linux.init
new file mode 100644 (file)
index 0000000..0972c90
--- /dev/null
@@ -0,0 +1,56 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides:          lcd4linux
+# Required-Start:
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: daemon for driving LCD based displays
+# Description:       LCD4Linux is a small program that grabs information from
+#                    the kernel and some subsystems and displays it on an
+#                    external liquid crystal display.
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/lcd4linux
+NAME=lcd4linux
+DESC=lcd4linux
+
+test -x $DAEMON || exit 0
+test -f /etc/lcd4linux.conf || exit 0
+
+set -e
+
+case "$1" in
+  start)
+       echo -n "Starting $DESC: "
+       chmod 600 /etc/lcd4linux.conf
+       start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+               --exec $DAEMON -- $DAEMON_OPTS
+       echo "$NAME."
+       ;;
+  stop)
+       echo -n "Stopping $DESC: "
+       start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
+               --exec $DAEMON || true
+       echo "$NAME."
+       ;;
+  restart|force-reload)
+       echo -n "Restarting $DESC: "
+       start-stop-daemon --stop --quiet --pidfile \
+               /var/run/$NAME.pid --exec $DAEMON
+       sleep 1
+       start-stop-daemon --start --quiet --pidfile \
+               /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+       echo "$NAME."
+       ;;
+  *)
+       N=/etc/init.d/$NAME
+       # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+       echo "Usage: $N {start|stop|restart|force-reload}" >&2
+       exit 1
+       ;;
+esac
+
+exit 0
diff --git a/packages/lcd4linux/lcd4linux_0.10.0.bb b/packages/lcd4linux/lcd4linux_0.10.0.bb
new file mode 100644 (file)
index 0000000..7b820dd
--- /dev/null
@@ -0,0 +1,26 @@
+DESCRIPTION = "LCD4Linux is a small program that grabs information from the kernel and some subsystems and displays it on an external liquid crystal display."
+LICENSE = "GPLv2"
+
+DEPENDS = "libusb ncurses readline virtual/libx11"
+
+PV = "0.10.0+0.10.1-RC2"
+PR = "r1"
+
+SRC_URI = "http://ssl.bulix.org/projects/lcd4linux/raw-attachment/wiki/Download/lcd4linux-0.10.1-RC2.tar.gz \
+           file://lcd4linux.init"
+
+S =  "${WORKDIR}/lcd4linux-0.10.1-RC2"
+
+
+inherit autotools update-rc.d
+
+INITSCRIPT_NAME = "lcd4linux"
+CONFFILES_${PN} += "${sysconfdir}/lcd4linux.conf"
+
+do_install_append() {
+       install -d ${D}/${sysconfdir}
+       install -m 0600 ${S}/lcd4linux.conf.sample  ${D}/${sysconfdir}/lcd4linux.conf
+       install -d ${D}/${INIT_D_DIR}
+       install -m 0755 ${WORKDIR}/lcd4linux.init ${D}/${INIT_D_DIR}/lcd4linux
+}
+