summaryrefslogtreecommitdiff
path: root/sys-fs/owfs
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
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-fs/owfs')
-rw-r--r--sys-fs/owfs/Manifest15
-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
-rw-r--r--sys-fs/owfs/metadata.xml25
-rw-r--r--sys-fs/owfs/owfs-3.1_p4.ebuild190
13 files changed, 481 insertions, 0 deletions
diff --git a/sys-fs/owfs/Manifest b/sys-fs/owfs/Manifest
new file mode 100644
index 000000000000..504a94310565
--- /dev/null
+++ b/sys-fs/owfs/Manifest
@@ -0,0 +1,15 @@
+AUX owfs-3.1-vendordir.patch 891 SHA256 72b1cc41342565e418a13f726ad3d3dcd8c6e9aab5ddf791b516ed35df18092e SHA512 d7131a4500419976ff2e153c44fbafc6164441e9fd5abff0bc4923cbcf672893c1c93d76ae6d1fda8cd7b808feaf4cfa9da201020622c8b45131f68d6ead478b WHIRLPOOL 08f4c276db1e062777d89a1981b8ba5f0532d9a284dc80c89b7c037a57ac135f465770b0df90ad04671eec442f171c362219a2127f67da8b6731ad685596a844
+AUX owfs-3.1p4-sysmacros.patch 2913 SHA256 a24436ace06e9d8b80560804984431c125700dabdb57cab04f683b4b72bfffcb SHA512 9a634156f9de9c65bf13ab2a4395be086318feb77d15210484e757ca578ca0010f976b217bf696c4d65ae5b42b65cbd26236942a506355b49bc105685ac804c8 WHIRLPOOL 621b589cebffed9c68a9661b38c8f24156a67a06e48ac60f6f853bc139480b4007a58ded35557b3380427bc20bd221295994f4a569a230416d9de554f4824d79
+AUX owfs.confd 86 SHA256 a9dcdfcea30619f692275a7ee9842746e10ed72884dd0c8184668cbe7f065783 SHA512 7c23bd956d2e22cc3952eefa52bd6b5b08c1b24561d5ac9cfc5222595d083ea64ba26dd0b4826e0fad3e2eb5774cc06a7bb6c7afd9c4c0726ce2b4b6df4dbdcd WHIRLPOOL bc8d7e66c34f8411387b3931f387b937e9a8fff81bcb0b48eaa086310962477e42927350f1ecbfad7dee2a854c86899910de63a434f0c77face3cedc54ec85d8
+AUX owfs.initd-r1 825 SHA256 f320583d58cc1ec431db9e1c52d587f86e23421a1065cd8815a640fca16eec94 SHA512 26623ab81bc3a1788ac2c4a51114f643bb18595a61f88856f25193b4c3c3723e785414448503ec89bc6cf9e16ea782890d56a6df4604711fe7eee06cd6613dad WHIRLPOOL f89fa52ca87831954c827113d311e41c8c4dcc592c427a8e63e3bff6baa0917988005bedb65ad6b04e45d9f9cd11a3eb77da84af8b7686ca4babed2015c5e2c4
+AUX owftpd.confd 121 SHA256 8106ed053b5931651c956348c68c82b8e2e31f8faa687f281566d72ac4e02d1b SHA512 7b8baba17d576139e3a9a9640e3c2006d9f847061aeff8a1e79b32ff116936421eccf8b545d64fe294acde4d483c170c728e80479f55e015ef030cf3ee06154a WHIRLPOOL 32f0b7cf14e7f937d14c1b568410d7ec124f685a0b334c5b9d44b8334dfb47f70f3e24e8580f7de746037006f21c611029496631b6b1d08ac0047259c9a766bc
+AUX owftpd.initd-r1 853 SHA256 19d8316252869979f4b510f3e8cb9538ec0c67e8ab348c29e2338016130b4d51 SHA512 0736b5100684247828bb793873cf1112b3b2a87c5a74a8f65b6b115699892325fb12f3016482ce4f42deceab8fb0f5251851738736f68fb417f0c277dea6369d WHIRLPOOL f657af0c59783bfa8ee842c9c242dda7bc15b8729dbb0a565b2bac8bc4e3474b6f2d565672700e11699e33cb99c96f430339a13a659b80a24206790e353759e6
+AUX owhttpd.confd 89 SHA256 a836e53af60e677f6c9a10f70777afc729b7edfbe2b9d2a33a509fa62619d07f SHA512 07a128115a830145c609a35813ba325b9b1ff3c2ecbbcece1e728a78971e1e7c4cf654054611c303ca47fd39ccfcff4707133a04fa8d689d3606ca7ceabd5a4f WHIRLPOOL 6aa38b9ff58566f53f5eacf9a9652c3d8290a9b341ec42c863163cc43102b744c0f5f289e7f9142b21b3c95b2ecd3fc8836b8ea67497e433c5695946dc2dd0b5
+AUX owhttpd.initd-r1 820 SHA256 2eb91c43aed975186793a9c23beb8733badb98f4c20ecf47cb477d7b373975c1 SHA512 79c0307bcb4913f563ca69e4a699b91a4e7a2133882d150694f6738eb8000175a7f840b5de9f07496c166c95fe71bb94c31ea167f6389dc9c37e0d08e2943bc9 WHIRLPOOL f29de8502a260f12cd71e89c88991d3bbd11c47ad830b091069800a65154c5980bc9cec7308068d013b0583db486af42d8c33894b33d00ab9f3665fb947c3d85
+AUX owserver.confd 108 SHA256 e14d16d11a9a4c597a957f2db48840e1fa6280db241dcab28922ae2c449940e7 SHA512 c10fb23a60d89348c82f6f5ee6b0ba1c5d59e506dcdf484fa0c9c8c6ae07064cafc39517670b5edb474bcc1921efddfce2e5dd879f59f3bb3a1f80d6df3c0411 WHIRLPOOL 1dbdd8ed06ea24b9abebdfe6190b9cf4aff20df66127732c283e6179ed685fc0a47e00b2690c4949042083ae52f39f9895d594c278b7596ff3e3ed6298f7311b
+AUX owserver.initd-r1 802 SHA256 d7e927246e307eb78aa769e1cb35dd64c64f7c2fdce8ded72e1855d848e19699 SHA512 3c2d186df7c3d4549333f90a87c80a44dd8ed67b10bacdc08edce2b45db35bd0bc7f0956bdee8f03a388ae8a5bab039f7bb19e3bad007632608f945c7e54c649 WHIRLPOOL eeadb7ca993b3897170f56fe3d7228759fd29f5bdc0e5eb5c969535b7171cfc16ec30dcf660a0f391d651002edc3b5bcf59afac404bd7c244ec5da280c60230a
+DIST owfs-3.1p4.tar.gz 1455420 SHA256 83ea34ede9f44665c5bef4e46fd9bbc087ad8a76c533bcbf03b436b7601e1e54 SHA512 9d04b466fc64761f53dc5fb11b4eb71d10154be5eb335174e8a9002a944bb3f2fbfe1cea3cf5962aa794486830e78d7ba5a7a87c68e3a4d32ab1a95e7ca59cdb WHIRLPOOL 0a1790e111e01bd66237899311ae348bd347f6446094fe7a33d36f2f86db5c18211abd13f76c7e080398f3daf3f20184542f083c818f028ec6f2ca695accebd4
+EBUILD owfs-3.1_p4.ebuild 4647 SHA256 a530fed772f8b3ffb322e1a30641f11c997b73ffe1c2e63f990bb3e6562f54b0 SHA512 1f47dccc49ffab0f6bbeb130fb55ea0c1a8af835f812cc0eeadbae5d812179882e183ca524a288693b8f62539f1b12e48e9ab7fe8d9d862cfebf6abe62c25bd0 WHIRLPOOL 42162e78169f7a0309382f6d8cdf42ab5e4b85aa8e959a10f0f58aa201e0603b36f1871e1e96f3cb238707c8f74437fec9992f22b6a670261a1a0f15c5af46f0
+MISC ChangeLog 4353 SHA256 36b80045f7cf6502e523deb028e9ee7f137844bdf04761e7207e70b22a639e08 SHA512 58106dd02386ab6a22e3c5450a1e55814a727f4adc4ccc96f50e840468d136b9128e393f99ea73489021828c509c154b8e5e1a569c9510269c4afb92e010c11c WHIRLPOOL e74537649e5512cb65f8303c74a2cfd533f767b2bf14575080d126d53ff798c694969c49dd3c3e9aa525bc5f8fc4a40bffabd1a90fbd995fa8e6f0317902ede6
+MISC ChangeLog-2015 4938 SHA256 dd91c024e2887b3e20efbac1552c5d69d01d01d8cc62706020c4e4a00671d1f7 SHA512 88bade78076fe391c9d65f79161de0e054db96d9538df1aa4aa8bf94e7c06d919905044762450b13803e5ef422f70ccb2fcbc3fe03989a012d762edc24ed6ed0 WHIRLPOOL e9522c1766a85d4d71de49b6178cdc12031447ab9163fab5fb2b2a01801ebe3c70ea5a3251a4a325969ad943699e73d9e6949b15c9fec3e2af509101b525a1d4
+MISC metadata.xml 1159 SHA256 58146c40cb0119952b0052ff16f60fcf97404d18e163f4ce41972d40ac29c1e0 SHA512 4cff718d367711e5a99891caa7c19db9f50d885200841096f17ec3ee64cd01d3938fa34d1f2c5e6de575dd3cb36c5ea4f3625fa604b11cfdebe13362ea37cefe WHIRLPOOL f45894a204bcbc65b62fe4caf37614ff57206c31b5ea0398cb1f8027ef3314bfdd1cbf967ea5c7e8b1e0a04b012bcc6fe5ca578484c8677ed3eace894c8b3e9d
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 $?
+}
diff --git a/sys-fs/owfs/metadata.xml b/sys-fs/owfs/metadata.xml
new file mode 100644
index 000000000000..3643be9f41d1
--- /dev/null
+++ b/sys-fs/owfs/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ OWFS (One Wire File System) is an easy way to use the powerful 1-wire system
+ of Dallas/Maxim. A simple and flexible program to monitor and control the
+ physical environment. You can write scripts to read temperature, flash
+ lights, write to an LCD, log and graph, ...
+ </longdescription>
+ <slots>
+ <subslots>Reflect ABI of libow.so.</subslots>
+ </slots>
+ <upstream>
+ <remote-id type="sourceforge">owfs</remote-id>
+ </upstream>
+ <use>
+ <flag name="ftdi">Enable support for USB FTDI chips via <pkg>dev-embedded/libftdi</pkg></flag>
+ <flag name="ftpd">Enable building the OWFS FTP server (owftpd)</flag>
+ <flag name="fuse">Enable building the FUSE-based OWFS client (owfs)</flag>
+ <flag name="httpd">Enable building the OWFS web server (owhttpd)</flag>
+ <flag name="parport">Enable support for the DS1410E parallel port adapter</flag>
+ <flag name="zeroconf">Enables support for zero-configuration networking via <pkg>net-dns/avahi</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-fs/owfs/owfs-3.1_p4.ebuild b/sys-fs/owfs/owfs-3.1_p4.ebuild
new file mode 100644
index 000000000000..50af8d0e122f
--- /dev/null
+++ b/sys-fs/owfs/owfs-3.1_p4.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit autotools distutils-r1 eutils linux-info perl-functions systemd user
+
+MY_P=${P/_/}
+
+DESCRIPTION="Access 1-Wire devices like a filesystem"
+SRC_URI="mirror://sourceforge/owfs/${MY_P}.tar.gz"
+HOMEPAGE="http://owfs.org/ https://sourceforge.net/projects/owfs/"
+
+KEYWORDS="amd64 arm x86"
+SLOT="0/4.0.0"
+LICENSE="GPL-2"
+
+RDEPEND="
+ ftdi? ( dev-embedded/libftdi:0 )
+ fuse? ( sys-fs/fuse )
+ perl? ( dev-lang/perl:= )
+ parport? ( sys-kernel/linux-headers )
+ php? ( dev-lang/php:=[cli] )
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( dev-lang/tcl:0= )
+ usb? ( virtual/libusb:0 )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )"
+
+DEPEND="${RDEPEND}
+ perl? ( dev-lang/swig )
+ php? ( dev-lang/swig )
+ python? ( dev-lang/swig )"
+
+IUSE="debug ftdi ftpd fuse httpd parport perl php python tcl usb zeroconf"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1-vendordir.patch
+ "${FILESDIR}"/${PN}-3.1p4-sysmacros.patch
+)
+
+S=${WORKDIR}/${MY_P}
+
+OWUID=${OWUID:-owfs}
+OWGID=${OWGID:-owfs}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-info_pkg_setup
+
+ if linux_config_exists; then
+ if ! linux_chkconfig_present W1; then
+ ewarn "CONFIG_W1 isn't set. You will not be able to use 1-wire bus on this system!"
+ fi
+ else
+ elog "Cannot find a linux kernel configuration. Continuing anyway."
+ fi
+ fi
+
+ use perl && perl_set_version
+
+ enewgroup ${OWGID} 150
+ enewuser ${OWUID} 150 -1 -1 ${OWGID}
+}
+
+src_prepare() {
+ default
+
+ # Support user's CFLAGS and LDFLAGS.
+ sed -i "s/@CPPFLAGS@/@CPPFLAGS@ ${CFLAGS}/" \
+ module/swig/perl5/OW/Makefile.linux.in || die
+ sed -i "s/@LIBS@/@LIBS@ ${LDFLAGS}/" \
+ module/swig/perl5/OW/Makefile.linux.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # disable owpython since we can build python anyway
+ # and without it, we don't have to fix the build ;)
+ local myeconf=(
+ $(use_enable debug)
+ $(use_enable fuse owfs)
+ $(use_enable ftdi)
+ $(use_enable ftpd owftpd)
+ $(use_enable httpd owhttpd)
+ $(use_enable parport)
+ $(use_enable perl owperl)
+ $(use_enable php owphp)
+ --disable-owpython
+ $(use_enable tcl owtcl)
+ $(use_enable zeroconf avahi)
+ $(use_enable zeroconf zero)
+ $(use_enable usb)
+ --with-systemdsystemunitdir=$(systemd_get_systemunitdir)
+ )
+
+ if use httpd || use ftpd || use fuse; then
+ myeconf+=( --enable-owserver )
+ else
+ myeconf+=( --disable-owserver )
+ fi
+
+ econf ${myeconf[@]}
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ local CFLAGS="${CFLAGS} -fno-strict-aliasing"
+
+ pushd module/ownet/python > /dev/null || die
+ distutils-r1_src_compile
+ popd > /dev/null || die
+
+ pushd module/swig/python > /dev/null || die
+ emake ow_wrap.c
+ distutils-r1_src_compile
+ popd > /dev/null || die
+ fi
+}
+
+src_test() { :; }
+
+src_install() {
+ default
+
+ if use httpd || use ftpd || use fuse; then
+ newinitd "${FILESDIR}"/owserver.initd-r1 owserver
+ newconfd "${FILESDIR}"/owserver.confd owserver
+
+ for i in httpd ftpd; do
+ if use ${i}; then
+ newinitd "${FILESDIR}"/ow${i}.initd-r1 ow${i}
+ newconfd "${FILESDIR}"/ow${i}.confd ow${i}
+ fi
+ done
+
+ if use fuse; then
+ dodir /var/lib/owfs
+ dodir /var/lib/owfs/mnt
+ newinitd "${FILESDIR}"/owfs.initd-r1 owfs
+ newconfd "${FILESDIR}"/owfs.confd owfs
+ fi
+ fi
+
+ use perl && perl_delete_localpod
+
+ if use python; then
+ pushd module/ownet/python > /dev/null || die
+ distutils-r1_src_install
+ popd > /dev/null || die
+
+ pushd module/swig/python > /dev/null || die
+ distutils-r1_src_install
+ popd > /dev/null || die
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if use httpd || use ftpd || use fuse; then
+ 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 "or install an appropriate UDEV rules (see http://owfs.org/index.php?page=udev-and-usb"
+ ewarn "for more information)."
+ ewarn
+ if use fuse; then
+ ewarn "In order to allow regular users to read from and/or write to"
+ ewarn "1 wire bus devices accessible via the owfs FUSE filesystem"
+ ewarn "client and its filesystem mountpoint, make sure the user is"
+ ewarn "a member of the group '${OWGID}'."
+ ewarn
+ fi
+ echo
+ fi
+ fi
+}