summaryrefslogtreecommitdiff
path: root/sys-fs/owfs/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-fs/owfs/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-fs/owfs/files')
-rw-r--r--sys-fs/owfs/files/owfs-3.1-vendordir.patch26
-rw-r--r--sys-fs/owfs/files/owfs-3.1p4-sysmacros.patch78
-rw-r--r--sys-fs/owfs/files/owfs.confd2
-rw-r--r--sys-fs/owfs/files/owfs.initd-r135
-rw-r--r--sys-fs/owfs/files/owftpd.confd2
-rw-r--r--sys-fs/owfs/files/owftpd.initd-r135
-rw-r--r--sys-fs/owfs/files/owhttpd.confd2
-rw-r--r--sys-fs/owfs/files/owhttpd.initd-r135
-rw-r--r--sys-fs/owfs/files/owserver.confd2
-rw-r--r--sys-fs/owfs/files/owserver.initd-r134
10 files changed, 251 insertions, 0 deletions
diff --git a/sys-fs/owfs/files/owfs-3.1-vendordir.patch b/sys-fs/owfs/files/owfs-3.1-vendordir.patch
new file mode 100644
index 000000000000..2592e8ad0fd7
--- /dev/null
+++ b/sys-fs/owfs/files/owfs-3.1-vendordir.patch
@@ -0,0 +1,26 @@
+diff --git a/module/ownet/perl5/Makefile.am b/module/ownet/perl5/Makefile.am
+index 5823f4b..cebe1e6 100644
+--- a/module/ownet/perl5/Makefile.am
++++ b/module/ownet/perl5/Makefile.am
+@@ -8,7 +8,7 @@ OWNet/Makefile: OWNet/Makefile.PL
+ if HAVE_DEBIAN
+ cd OWNet; $(PERL) Makefile.PL INSTALLDIRS=vendor
+ else
+- cd OWNet; $(PERL) Makefile.PL
++ cd OWNet; $(PERL) Makefile.PL INSTALLDIRS=vendor
+ endif
+
+ install-data-local: OWNet/Makefile
+diff --git a/module/swig/perl5/Makefile.am b/module/swig/perl5/Makefile.am
+index 8e5f583..49cd252 100644
+--- a/module/swig/perl5/Makefile.am
++++ b/module/swig/perl5/Makefile.am
+@@ -19,7 +19,7 @@ else
+ if HAVE_DEBIAN
+ ( cd OW; $(PERL) Makefile.PL INSTALLDIRS=vendor )
+ else
+- ( cd OW; $(PERL) Makefile.PL )
++ ( cd OW; $(PERL) Makefile.PL INSTALLDIRS=vendor )
+ if HAVE_FREEBSD
+ $(PERL) -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' OW/Makefile
+
diff --git a/sys-fs/owfs/files/owfs-3.1p4-sysmacros.patch b/sys-fs/owfs/files/owfs-3.1p4-sysmacros.patch
new file mode 100644
index 000000000000..dcb67a6d19c7
--- /dev/null
+++ b/sys-fs/owfs/files/owfs-3.1p4-sysmacros.patch
@@ -0,0 +1,78 @@
+From 6565314e775232cf1682b35720b8b1b207a16f3e Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Wed, 21 Sep 2016 15:38:52 +0200
+Subject: [PATCH] configure: Add AC_HEADER_MAJOR to find where major() is
+ defined
+
+glibc currently pulls sys/sysmacros.h into sys/types.h, but this may
+change in a future release.
+
+https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
+
+Gentoo-Bug: https://bugs.gentoo.org/580922
+---
+ configure.ac | 4 +++-
+ module/owlib/src/include/ow.h | 7 +++++--
+ module/ownet/c/src/include/ow.h | 8 ++++++--
+ 3 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c1e3d77..3b32fbe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -180,10 +180,12 @@ m4_include([src/scripts/m4/acx_pthread.m4])
+ # Checks for header files.
+ AC_HEADER_DIRENT
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS([asm/types.h arpa/inet.h sys/ioctl.h sys/mkdev.h sys/socket.h sys/time.h sys/times.h sys/types.h sys/param.h sys/uio.h feature_tests.h fcntl.h netinet/in.h stdlib.h string.h strings.h sys/file.h syslog.h termios.h unistd.h limits.h stdint.h features.h getopt.h resolv.h semaphore.h])
++AC_CHECK_HEADERS([asm/types.h arpa/inet.h sys/ioctl.h sys/socket.h sys/time.h sys/times.h sys/types.h sys/param.h sys/uio.h feature_tests.h fcntl.h netinet/in.h stdlib.h string.h strings.h sys/file.h syslog.h termios.h unistd.h limits.h stdint.h features.h getopt.h resolv.h semaphore.h])
+ AC_CHECK_HEADERS([linux/limits.h linux/types.h netdb.h dlfcn.h])
+ AC_CHECK_HEADERS(sys/event.h sys/inotify.h)
+
++AC_HEADER_MAJOR
++
+ # Test if debugging out enabled
+ ENABLE_DEBUG="true"
+ AC_MSG_CHECKING([if debug-output is enabled])
+diff --git a/module/owlib/src/include/ow.h b/module/owlib/src/include/ow.h
+index 9dbec5f..2a6050d 100644
+--- a/module/owlib/src/include/ow.h
++++ b/module/owlib/src/include/ow.h
+@@ -188,9 +188,12 @@
+ #include <netdb.h> /* for getaddrinfo */
+ #endif /* HAVE_NETDB_H */
+
+-#ifdef HAVE_SYS_MKDEV_H
++#ifdef MAJOR_IN_MKDEV
+ #include <sys/mkdev.h> /* for major() */
+-#endif /* HAVE_SYS_MKDEV_H */
++#endif /* MAJOR_IN_MKDEV */
++#ifdef MAJOR_IN_SYSMACROS
++#include <sys/sysmacros.h> /* for major() */
++#endif /* MAJOR_IN_MKDEV */
+
+ #include <stddef.h> // for offsetof()
+
+diff --git a/module/ownet/c/src/include/ow.h b/module/ownet/c/src/include/ow.h
+index c157a7c..aeeba8e 100644
+--- a/module/ownet/c/src/include/ow.h
++++ b/module/ownet/c/src/include/ow.h
+@@ -118,9 +118,13 @@
+
+ #include <netdb.h> /* addrinfo */
+
+-#ifdef HAVE_SYS_MKDEV_H
++#ifdef MAJOR_IN_MKDEV
+ #include <sys/mkdev.h> /* for major() */
+-#endif /* HAVE_SYS_MKDEV_H */
++#endif /* MAJOR_IN_MKDEV */
++#ifdef MAJOR_IN_SYSMACROS
++#include <sys/sysmacros.h> /* for major() */
++#endif /* MAJOR_IN_MKDEV */
++
+
+ /* Can't include search.h when compiling owperl on Fedora Core 1. */
+ #ifndef SKIP_SEARCH_H
+--
+2.10.0
+
diff --git a/sys-fs/owfs/files/owfs.confd b/sys-fs/owfs/files/owfs.confd
new file mode 100644
index 000000000000..f85d25e74f22
--- /dev/null
+++ b/sys-fs/owfs/files/owfs.confd
@@ -0,0 +1,2 @@
+# owfs configuration
+OWFS_OPTS="-m /var/lib/owfs/mnt --allow_other -s 127.0.0.1:4304"
diff --git a/sys-fs/owfs/files/owfs.initd-r1 b/sys-fs/owfs/files/owfs.initd-r1
new file mode 100644
index 000000000000..fce0f5e52d4a
--- /dev/null
+++ b/sys-fs/owfs/files/owfs.initd-r1
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+INSTANCE=${SVCNAME#*.}
+PROGRAM=${SVCNAME%%.*}
+PIDFILE=${PIDFILE:-/run/owfs/${PROGRAM}.pid}
+OWUID=${OWUID:-owfs}
+OWGID=${OWGID:-owfs}
+
+depend() {
+ need owserver
+ use logger
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o ${OWUID}:${OWGID} "$(dirname ${PIDFILE})"
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/bin/${PROGRAM} \
+ --pidfile ${PIDFILE} --user ${OWUID}:${OWGID} -- \
+ --pid-file ${PIDFILE} \
+ --background --error_print 1 \
+ ${OWFS_OPTS:--m /var/lib/owfs/mnt --allow_other -s 127.0.0.1:4304}
+ 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/owftpd.confd b/sys-fs/owfs/files/owftpd.confd
new file mode 100644
index 000000000000..fc93d2fd7195
--- /dev/null
+++ b/sys-fs/owfs/files/owftpd.confd
@@ -0,0 +1,2 @@
+# owfs owftpd configuration
+OWFTPD_OPTS="--nozero -p 127.0.0.1:4381 -s 127.0.0.1:4304 --max_clients 5 --timeout_ftp 600"
diff --git a/sys-fs/owfs/files/owftpd.initd-r1 b/sys-fs/owfs/files/owftpd.initd-r1
new file mode 100644
index 000000000000..8bbf93b49dc8
--- /dev/null
+++ b/sys-fs/owfs/files/owftpd.initd-r1
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+INSTANCE=${SVCNAME#*.}
+PROGRAM=${SVCNAME%%.*}
+PIDFILE=${PIDFILE:-/run/owfs/${PROGRAM}.pid}
+OWUID=${OWUID:-owfs}
+OWGID=${OWGID:-owfs}
+
+depend() {
+ need owserver
+ use logger
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o ${OWUID}:${OWGID} "$(dirname ${PIDFILE})"
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/bin/${PROGRAM} \
+ --pidfile ${PIDFILE} --user ${OWUID}:${OWGID} -- \
+ --pid-file ${PIDFILE} \
+ --background --error_print 1 \
+ ${OWFTPD_OPTS:---nozero -p 127.0.0.1:4381 -s 127.0.0.1:4304 --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..2a5200c31118
--- /dev/null
+++ b/sys-fs/owfs/files/owhttpd.confd
@@ -0,0 +1,2 @@
+# owfs owhttpd configuration
+OWHTTPD_OPTS="--nozero -p 127.0.0.1:4380 -s 127.0.0.1:4304"
diff --git a/sys-fs/owfs/files/owhttpd.initd-r1 b/sys-fs/owfs/files/owhttpd.initd-r1
new file mode 100644
index 000000000000..cf3af54f50e9
--- /dev/null
+++ b/sys-fs/owfs/files/owhttpd.initd-r1
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+INSTANCE=${SVCNAME#*.}
+PROGRAM=${SVCNAME%%.*}
+PIDFILE=${PIDFILE:-/run/owfs/${PROGRAM}.pid}
+OWUID=${OWUID:-owfs}
+OWGID=${OWGID:-owfs}
+
+depend() {
+ need owserver
+ use logger
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o ${OWUID}:${OWGID} "$(dirname ${PIDFILE})"
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/bin/${PROGRAM} \
+ --pidfile ${PIDFILE} --user ${OWUID}:${OWGID} -- \
+ --pid-file ${PIDFILE} \
+ --background --error_print 1 \
+ ${OWHTTPD_OPTS:---nozero -p 127.0.0.1:4380 -s 127.0.0.1:4304}
+ 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/owserver.confd b/sys-fs/owfs/files/owserver.confd
new file mode 100644
index 000000000000..e764e2df10ec
--- /dev/null
+++ b/sys-fs/owfs/files/owserver.confd
@@ -0,0 +1,2 @@
+# owfs owserver configuration
+OWSERVER_OPTS="--nozero -p 127.0.0.1:4304 -d /dev/ttyS0 --timeout_volatile 5"
diff --git a/sys-fs/owfs/files/owserver.initd-r1 b/sys-fs/owfs/files/owserver.initd-r1
new file mode 100644
index 000000000000..88b9790882f5
--- /dev/null
+++ b/sys-fs/owfs/files/owserver.initd-r1
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+INSTANCE=${SVCNAME#*.}
+PROGRAM=${SVCNAME%%.*}
+PIDFILE=${PIDFILE:-/run/owfs/${PROGRAM}.pid}
+OWUID=${OWUID:-owfs}
+OWGID=${OWGID:-owfs}
+
+depend() {
+ use logger
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o ${OWUID}:${OWGID} "$(dirname ${PIDFILE})"
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/bin/${PROGRAM} \
+ --pidfile ${PIDFILE} --user ${OWUID}:${OWGID} -- \
+ --pid-file ${PIDFILE} \
+ --background --error_print 1 \
+ ${OWSERVER_OPTS:---nozero -p 127.0.0.1:4304 -d /dev/ttyS0}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/bin/${PROGRAM} \
+ --pidfile ${PIDFILE} -u ${OWUID}
+ eend $?
+}