[oe-commits] Dirk Opfer : owfs: new recipe, version 2.7p21

GIT User account git at amethyst.openembedded.net
Wed Apr 22 08:42:02 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: b2bbfbf9df3fce104eba8e34121610f4c56a4625
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=b2bbfbf9df3fce104eba8e34121610f4c56a4625

Author: Dirk Opfer <dirk at do13.de>
Date:   Wed Apr 22 10:31:52 2009 +0200

owfs: new recipe, version 2.7p21
OWFS is an easy way to use the powerful 1-wire system of Dallas/Maxim

---

 recipes/owfs/files/owhttpd  |   60 +++++++++++++++++++++++++++++++++++++++++++
 recipes/owfs/files/owserver |   59 ++++++++++++++++++++++++++++++++++++++++++
 recipes/owfs/owfs_2.7p21.bb |   58 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 177 insertions(+), 0 deletions(-)

diff --git a/recipes/owfs/files/owhttpd b/recipes/owfs/files/owhttpd
new file mode 100755
index 0000000..5d74d13
--- /dev/null
+++ b/recipes/owfs/files/owhttpd
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/bin
+
+DAEMON="owhttpd"
+
+test -f /usr/bin/${DAEMON} || exit 0
+
+if test -f /etc/default/${DAEMON} ; then
+. /etc/default/${DAEMON}
+else
+:
+fi
+
+if [ "$START_OWHTTPD" != "yes" ]
+then
+        exit 0
+fi
+	
+
+startdaemon(){
+	echo -n "Starting ${DAEMON}: "
+	start-stop-daemon --start -x /usr/bin/${DAEMON}  -- ${CMDLINE} --pid_file /var/run/${DAEMON}.pid
+	echo "done"
+}
+
+stopdaemon(){
+	echo -n "Stopping ${DAEMON}: "
+	start-stop-daemon --stop -p /var/run/${DAEMON}.pid
+        echo "done"
+}
+										
+
+
+case "$1" in
+  start)
+	startdaemon
+	;;
+  stop)
+	stopdaemon
+	;;
+  force-reload)
+	stopdaemon
+	startdaemon
+	;;
+  restart)
+	stopdaemon
+	startdaemon
+	;;
+  reload)
+	stopdaemon
+	startdaemon
+	;;
+  *)
+	echo "Usage: ${DAEMON} { start | stop | restart | reload }" >&2
+	exit 1
+	;;
+esac
+																						
+exit 0
diff --git a/recipes/owfs/files/owserver b/recipes/owfs/files/owserver
new file mode 100755
index 0000000..b69ea53
--- /dev/null
+++ b/recipes/owfs/files/owserver
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/bin
+
+DAEMON="owserver"
+
+test -f /usr/bin/${DAEMON} || exit 0
+
+if test -f /etc/default/${DAEMON} ; then
+. /etc/default/${DAEMON}
+else
+:
+fi
+
+if [ "$START_OWSERVER" != "yes" ] 
+then  
+	exit 0
+fi
+
+startdaemon(){
+	echo -n "Starting ${DAEMON}: "
+	start-stop-daemon --start -x /usr/bin/${DAEMON} --  ${CMDLINE} --pid_file /var/run/${DAEMON}.pid
+	echo "done"
+}
+
+stopdaemon(){
+	echo -n "Stopping ${DAEMON}: "
+	start-stop-daemon --stop -p /var/run/${DAEMON}.pid
+        echo "done"
+}
+										
+
+
+case "$1" in
+  start)
+	startdaemon
+	;;
+  stop)
+	stopdaemon
+	;;
+  force-reload)
+	stopdaemon
+	startdaemon
+	;;
+  restart)
+	stopdaemon
+	startdaemon
+	;;
+  reload)
+	stopdaemon
+	startdaemon
+	;;
+  *)
+	echo "Usage: ${DAEMON} { start | stop | restart | reload }" >&2
+	exit 1
+	;;
+esac
+																						
+exit 0
diff --git a/recipes/owfs/owfs_2.7p21.bb b/recipes/owfs/owfs_2.7p21.bb
new file mode 100644
index 0000000..b195054
--- /dev/null
+++ b/recipes/owfs/owfs_2.7p21.bb
@@ -0,0 +1,58 @@
+DESCRIPTION = "1-Wire file system"
+HOMEPAGE = "http://www.owfs.org/"
+SECTION = "console/network"
+PRIORITY = "optional"
+LICENSE = "GPLv2"
+DEPENDS += "fuse libusb"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/owfs/owfs-${PV}.tar.gz \
+           file://owhttpd \
+           file://owserver "
+
+inherit autotools update-rc.d
+
+EXTRA_OECONF = " \
+                 --enable-owhttpd \
+                 --enable-cache \
+                 --enable-mt \
+                 "
+
+do_install_prepend() {
+        install -d ${D}${sysconfdir}/default/
+        install -d ${D}${sysconfdir}/init.d/
+        install -m 0755 ${WORKDIR}/owhttpd ${D}${sysconfdir}/init.d/owhttpd
+        install -m 0755 ${WORKDIR}/owserver ${D}${sysconfdir}/init.d/owserver
+}
+do_stage() {
+        autotools_stage_all
+}
+
+PACKAGES =+ "owftpd owhttpd owserver owshell libowcapi libow libownet owmon owtap"
+
+DESCRIPTION_owftpd = "Anoymous FTP server for 1-wire access"
+DESCRIPTION_owhttpd = "Tiny webserver for 1-wire control"
+DESCRIPTION_owserver = "Backend server (daemon) for 1-wire control"
+DESCRIPTION_owshell = "owdir owread owwrite owpresent owget - lightweight owserver access"
+DESCRIPTION_libowcapi = "easy C-language 1-wire interface "
+DESCRIPTION_libow = "easy C-language 1-wire interface to the owserver protocol"
+DESCRIPTION_libownet = "easy C-language 1-wire interface to the owserver protocol"
+DESCRIPTION_owmon = "Monitor for owserver settings and statistics"
+DESCRIPTION_owtap = "Packet sniffer for the owserver protocol"
+
+FILES_owftpd = "${bindir}/owftpd"
+FILES_owhttpd = "${bindir}/owhttpd ${sysconfdir}/init.d/owhttpd"
+FILES_owserver = "${bindir}/owserver ${sysconfdir}/init.d/owserver"
+FILES_owshell = "${bindir}/owread ${bindir}/owwrite \
+                 ${bindir}/owdir ${bindir}/owpresent \
+                 ${bindir}/owget ${bindir}/owside"
+FILES_owmon = "${bindir}/owmon"
+FILES_owtap = "${bindir}/owtap"
+FILES_libowcapi = "${libdir}/libowcapi-*"
+FILES_libow = "${libdir}/libow-*"
+FILES_libownet = "${libdir}/libownet-*"
+
+INITSCRIPT_PACKAGES = "owhttpd owserver"
+INITSCRIPT_NAME_owserver = "owserver"
+INITSCRIPT_NAME_owhttpd = "owhttpd"
+INITSCRIPT_PARAMS_owserver = "defaults 20"
+INITSCRIPT_PARAMS_owhttpd = "defaults 21"





More information about the Openembedded-commits mailing list