summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Schlich <wschlich@gentoo.org>2007-12-15 16:10:07 +0000
committerWolfram Schlich <wschlich@gentoo.org>2007-12-15 16:10:07 +0000
commitb0fd4ce992e58d92114d6163cca7b82d841882fb (patch)
tree88aca40f31cf13abe82ce943a927a41fec001bc1 /sys-fs/owfs
parentadded zeroconf and ftpd USE flags for sys-fs/owfs (diff)
downloadgentoo-2-b0fd4ce992e58d92114d6163cca7b82d841882fb.tar.gz
gentoo-2-b0fd4ce992e58d92114d6163cca7b82d841882fb.tar.bz2
gentoo-2-b0fd4ce992e58d92114d6163cca7b82d841882fb.zip
added daemon init scripts and zeroconf USE flag, renamed ftp USE flag to ftpd
(Portage version: 2.1.4_rc7)
Diffstat (limited to 'sys-fs/owfs')
-rw-r--r--sys-fs/owfs/ChangeLog10
-rw-r--r--sys-fs/owfs/files/digest-owfs-2.7_p0-r13
-rw-r--r--sys-fs/owfs/files/owftpd.confd2
-rwxr-xr-xsys-fs/owfs/files/owftpd.initd32
-rw-r--r--sys-fs/owfs/files/owhttpd.confd2
-rwxr-xr-xsys-fs/owfs/files/owhttpd.initd32
-rw-r--r--sys-fs/owfs/files/owserver.confd2
-rwxr-xr-xsys-fs/owfs/files/owserver.initd32
-rw-r--r--sys-fs/owfs/owfs-2.7_p0-r1.ebuild102
9 files changed, 216 insertions, 1 deletions
diff --git a/sys-fs/owfs/ChangeLog b/sys-fs/owfs/ChangeLog
index 96c2a5c7ac10..a1771c192aac 100644
--- a/sys-fs/owfs/ChangeLog
+++ b/sys-fs/owfs/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-fs/owfs
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/owfs/ChangeLog,v 1.2 2007/12/08 02:24:51 wschlich Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/owfs/ChangeLog,v 1.3 2007/12/15 16:10:06 wschlich Exp $
+
+*owfs-2.7_p0-r1 (15 Dec 2007)
+
+ 15 Dec 2007; Wolfram Schlich <wschlich@gentoo.org> +files/owftpd.confd,
+ +files/owftpd.initd, +files/owhttpd.confd, +files/owhttpd.initd,
+ +files/owserver.confd, +files/owserver.initd, +owfs-2.7_p0-r1.ebuild:
+ added daemon init scripts and zeroconf USE flag, renamed ftp
+ USE flag to ftpd
08 Dec 2007; Wolfram Schlich <wschlich@gentoo.org> owfs-2.7_p0.ebuild:
fix php check, add ~amd64
diff --git a/sys-fs/owfs/files/digest-owfs-2.7_p0-r1 b/sys-fs/owfs/files/digest-owfs-2.7_p0-r1
new file mode 100644
index 000000000000..6e4364d3b0c7
--- /dev/null
+++ b/sys-fs/owfs/files/digest-owfs-2.7_p0-r1
@@ -0,0 +1,3 @@
+MD5 07ee9ad9973c47b3ab6da923c97fa5eb owfs-2.7p0.tar.gz 1058362
+RMD160 734d385b93611e988499f47f805c4af090ad5bb8 owfs-2.7p0.tar.gz 1058362
+SHA256 dc1f7fe5cad844070eabe98149978c513c625a5a072987857bf1bc42eca42f8a owfs-2.7p0.tar.gz 1058362
diff --git a/sys-fs/owfs/files/owftpd.confd b/sys-fs/owfs/files/owftpd.confd
new file mode 100644
index 000000000000..d9435314af15
--- /dev/null
+++ b/sys-fs/owfs/files/owftpd.confd
@@ -0,0 +1,2 @@
+# owfs owftpd configuration
+OWFTPD_OPTS="--nozero -p 127.0.0.1:9321 -s 127.0.0.1:9300 --max_clients 5 --timeout_ftp 600"
diff --git a/sys-fs/owfs/files/owftpd.initd b/sys-fs/owfs/files/owftpd.initd
new file mode 100755
index 000000000000..30c70eb8a3b6
--- /dev/null
+++ b/sys-fs/owfs/files/owftpd.initd
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/owfs/files/owftpd.initd,v 1.1 2007/12/15 16:10:07 wschlich Exp $
+
+INSTANCE=${SVCNAME#*.}
+PROGRAM=${SVCNAME%%.*}
+PIDFILE=${PIDFILE:-/var/run/owfs/${PROGRAM}.pid}
+OWUID=${OWUID:-owfs}
+OWGID=${OWGID:-owfs}
+
+depend() {
+ need net
+ use logger owserver
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/bin/${PROGRAM} \
+ --pidfile ${PIDFILE} -c ${OWUID}:${OWGID} -- \
+ --pid_file ${PIDFILE} \
+ --background --error_print 1 \
+ ${OWFTPD_OPTS:---nozero -p 127.0.0.1:9321 -s 127.0.0.1:9300 --max_clients 5 --timeout_ftp 600}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/bin/${PROGRAM} \
+ --pidfile ${PIDFILE} -u ${OWUID}
+ eend $?
+}
diff --git a/sys-fs/owfs/files/owhttpd.confd b/sys-fs/owfs/files/owhttpd.confd
new file mode 100644
index 000000000000..604d79b7b5c7
--- /dev/null
+++ b/sys-fs/owfs/files/owhttpd.confd
@@ -0,0 +1,2 @@
+# owfs owhttpd configuration
+OWHTTPD_OPTS="--nozero -p 127.0.0.1:9380 -s 127.0.0.1:9300"
diff --git a/sys-fs/owfs/files/owhttpd.initd b/sys-fs/owfs/files/owhttpd.initd
new file mode 100755
index 000000000000..24b40783e471
--- /dev/null
+++ b/sys-fs/owfs/files/owhttpd.initd
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/owfs/files/owhttpd.initd,v 1.1 2007/12/15 16:10:07 wschlich Exp $
+
+INSTANCE=${SVCNAME#*.}
+PROGRAM=${SVCNAME%%.*}
+PIDFILE=${PIDFILE:-/var/run/owfs/${PROGRAM}.pid}
+OWUID=${OWUID:-owfs}
+OWGID=${OWGID:-owfs}
+
+depend() {
+ need net
+ use logger owserver
+}
+
+start() {
+ ebegin "Starting owhttpd"
+ start-stop-daemon --start --exec /usr/bin/${PROGRAM} \
+ --pidfile ${PIDFILE} -c ${OWUID}:${OWGID} -- \
+ --pid_file ${PIDFILE} \
+ --background --error_print 1 \
+ ${OWHTTPD_OPTS:---nozero -p 127.0.0.1:9380 -s 127.0.0.1:9300}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping owhttpd"
+ start-stop-daemon --stop --exec /usr/bin/${PROGRAM} \
+ --pidfile ${PIDFILE} -u ${OWUID}
+ eend $?
+}
diff --git a/sys-fs/owfs/files/owserver.confd b/sys-fs/owfs/files/owserver.confd
new file mode 100644
index 000000000000..5ec6f3f54b72
--- /dev/null
+++ b/sys-fs/owfs/files/owserver.confd
@@ -0,0 +1,2 @@
+# owfs owserver configuration
+OWSERVER_OPTS="--nozero -p 127.0.0.1:9300 -d /dev/ttyS0 --timeout_volatile 5"
diff --git a/sys-fs/owfs/files/owserver.initd b/sys-fs/owfs/files/owserver.initd
new file mode 100755
index 000000000000..402e319ce40c
--- /dev/null
+++ b/sys-fs/owfs/files/owserver.initd
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/owfs/files/owserver.initd,v 1.1 2007/12/15 16:10:07 wschlich Exp $
+
+INSTANCE=${SVCNAME#*.}
+PROGRAM=${SVCNAME%%.*}
+PIDFILE=${PIDFILE:-/var/run/owfs/${PROGRAM}.pid}
+OWUID=${OWUID:-owfs}
+OWGID=${OWGID:-owfs}
+
+depend() {
+ need net
+ use logger
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/bin/${PROGRAM} \
+ --pidfile ${PIDFILE} -c ${OWUID}:${OWGID} -- \
+ --pid_file ${PIDFILE} \
+ --background --error_print 1 \
+ ${OWSERVER_OPTS:---nozero -p 127.0.0.1:9300 -d /dev/ttyS0}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/bin/${PROGRAM} \
+ --pidfile ${PIDFILE} -u ${OWUID}
+ eend $?
+}
diff --git a/sys-fs/owfs/owfs-2.7_p0-r1.ebuild b/sys-fs/owfs/owfs-2.7_p0-r1.ebuild
new file mode 100644
index 000000000000..e325797aa092
--- /dev/null
+++ b/sys-fs/owfs/owfs-2.7_p0-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/owfs/owfs-2.7_p0-r1.ebuild,v 1.1 2007/12/15 16:10:06 wschlich Exp $
+
+inherit eutils
+
+MY_P=${P/_/}
+
+DESCRIPTION="Access 1-Wire devices like a filesystem"
+SRC_URI="mirror://sourceforge/owfs/${MY_P}.tar.gz"
+HOMEPAGE="http://www.owfs.org/ http://owfs.sourceforge.net/"
+LICENSE="GPL-2"
+DEPEND="fuse? ( sys-fs/fuse )
+ perl? ( dev-lang/perl dev-lang/swig )
+ php? ( dev-lang/php dev-lang/swig )
+ python? ( dev-lang/python dev-lang/swig )
+ tcl? ( dev-lang/tcl )
+ usb? ( dev-libs/libusb )
+ zeroconf? ( || ( net-dns/avahi net-misc/mDNSResponder ) )"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="debug fuse ftpd httpd parport perl php python server tcl usb zeroconf"
+
+S=${WORKDIR}/${MY_P}
+
+OWUID=${OWUID:-owfs}
+OWGID=${OWGID:-owfs}
+
+pkg_setup() {
+ if use php && has_version dev-lang/php && ! built_with_use dev-lang/php cli; then
+ eerror "${PN} needs the command line interface (CLI) of php"
+ eerror "Please re-emerge dev-lang/php with USE=cli"
+ die "need dev-lang/php built with cli USE flag"
+ fi
+ if use zeroconf && has_version net-dns/avahi && ! built_with_use net-dns/avahi mdnsresponder-compat; then
+ eerror "You need to recompile net-dns/avahi with mdnsresponder-compat USE flag"
+ die "net-dns/avahi is missing required mdnsresponder-compat support for USE=zeroconf"
+ fi
+ enewgroup ${OWGID} 150
+ enewuser ${OWUID} 150 -1 -1 ${OWGID}
+}
+
+src_compile() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable fuse owfs) \
+ $(use_enable ftpd owftpd) \
+ $(use_enable httpd owhttpd) \
+ $(use_enable parport) \
+ $(use_enable perl owperl) \
+ $(use_enable php owphp) \
+ $(use_enable python owpython) \
+ $(use_enable server owserver) \
+ $(use_enable tcl owtcl) \
+ $(use_enable zeroconf zero) \
+ $(use_enable usb) \
+ || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc README NEWS ChangeLog AUTHORS
+ if use server || use httpd || use ftpd; then
+ diropts -m 0750 -o ${OWUID} -g ${OWGID}
+ dodir /var/run/owfs
+ for i in server httpd ftpd; do
+ if use ${i}; then
+ newinitd "${FILESDIR}"/ow${i}.initd ow${i}
+ newconfd "${FILESDIR}"/ow${i}.confd ow${i}
+ fi
+ done
+ fi
+}
+
+pkg_postinst() {
+ if use server || use httpd || use ftpd; then
+ echo
+ einfo
+ einfo "Be sure to check/edit the following files,"
+ einfo "e.g. to fit your 1 wire bus controller"
+ einfo "device or daemon network settings:"
+ for i in server httpd ftpd; do
+ if use ${i}; then
+ einfo "- ${ROOT%/}/etc/conf.d/ow${i}"
+ fi
+ done
+ einfo
+ echo
+ if [[ ${OWUID} != root ]]; then
+ ewarn
+ ewarn "In order to allow the OWFS daemon user '${OWUID}' to read"
+ ewarn "from and/or write to a 1 wire bus controller device, make"
+ ewarn "sure the user has appropriate permission to access the"
+ ewarn "corresponding device node/path (e.g. /dev/ttyS0), for example"
+ ewarn "by adding the user to the group 'uucp' (for serial devices)"
+ ewarn "or 'usb' (for USB devices accessed via usbfs on /proc/bus/usb)."
+ ewarn
+ echo
+ fi
+ fi
+}