summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2018-06-01 15:10:14 -0400
committerBrian Evans <grknight@gentoo.org>2018-06-01 15:10:14 -0400
commit6eb170217d70df674dccf0973f6d933c8e88305a (patch)
treea867f5b7952c9cbdbb907b5ae29062ddeb0c7545 /net-misc
parentsys-fs/hfsutils: use HTTPs (diff)
downloadgentoo-6eb170217d70df674dccf0973f6d933c8e88305a.tar.gz
gentoo-6eb170217d70df674dccf0973f6d933c8e88305a.tar.bz2
gentoo-6eb170217d70df674dccf0973f6d933c8e88305a.zip
net-misc/omnisync: New package
Driver for NTPd for people who are firewall-challenged Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/omnisync/Manifest1
-rw-r--r--net-misc/omnisync/files/omnisync.confd21
-rw-r--r--net-misc/omnisync/files/omnisync.initd20
-rw-r--r--net-misc/omnisync/metadata.xml8
-rw-r--r--net-misc/omnisync/omnisync-1.0.ebuild40
5 files changed, 90 insertions, 0 deletions
diff --git a/net-misc/omnisync/Manifest b/net-misc/omnisync/Manifest
new file mode 100644
index 000000000000..176a959130c5
--- /dev/null
+++ b/net-misc/omnisync/Manifest
@@ -0,0 +1 @@
+DIST omnisync-1.0.tgz 27725 BLAKE2B 00e546e3a04c8483f4a3995207fe6715e25526ca639f517220725c31d50d1c01fe0d15927e11e84143f3b2c8aa80ede1317c818945f0249147548bb03d27f744 SHA512 742ffc0a85bd923b99ae7e4f50a6aaa29107eaa987039e902797c78a9673e914e1fa61b2484c6777f62b0caf8b3110a071fd103c8b18456083883df534a1ef4d
diff --git a/net-misc/omnisync/files/omnisync.confd b/net-misc/omnisync/files/omnisync.confd
new file mode 100644
index 000000000000..c2ab3cc58f0e
--- /dev/null
+++ b/net-misc/omnisync/files/omnisync.confd
@@ -0,0 +1,21 @@
+# REQUIRED, must be one of time/tcp time/udp daytime/tcp daytime/udp http https
+# snts irc icmp icmp snmp simpleptpl socks5sntp sntp
+OMNISYNC_MODE=""
+
+# Options to add
+# -F x fudge factor (default: 0.000000) -m x max. offset (default: 7200.000000)
+# -p x proxy-server (http/https/socks5sntp only)
+# -B x bind to interface x (not for snmp)
+# -I x username[:password] (irc/socks5 auth. only)
+# -c x community (snmp only)
+# -h x host to connect to
+# -u x ntpd shared memory unit
+# -z x do an initial step, to speed up syncing, parameter is number of samples-S x write measurements to file x
+# -n do NOT submit to NTPd/set clock, query only (use in combination with -v and -f)
+# -f do not fork
+# -i x check interval (default: 60)
+# -d x timeout
+# -U x set user to run as
+# -P x write pid to file x
+# -v increase verbosity
+OMNISYNC_ARGS=""
diff --git a/net-misc/omnisync/files/omnisync.initd b/net-misc/omnisync/files/omnisync.initd
new file mode 100644
index 000000000000..7820af6e94e3
--- /dev/null
+++ b/net-misc/omnisync/files/omnisync.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+}
+
+command="/usr/sbin/omnisync"
+command_args="-M ${OMNISYNC_MODE} ${OMNISYNC_ARGS}"
+
+start_pre() {
+ if [ -z "${OMNISYNC_MODE}" ] ; then
+ eerror 'Configuration incomplete! OMNISYNC_MODE not set'
+ return 1
+ fi
+ return 0
+}
+
+# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet:
diff --git a/net-misc/omnisync/metadata.xml b/net-misc/omnisync/metadata.xml
new file mode 100644
index 000000000000..b651dc535e37
--- /dev/null
+++ b/net-misc/omnisync/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>grknight@gentoo.org</email>
+ <name>Brian Evans</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/omnisync/omnisync-1.0.ebuild b/net-misc/omnisync/omnisync-1.0.ebuild
new file mode 100644
index 000000000000..6c0ff7635dcf
--- /dev/null
+++ b/net-misc/omnisync/omnisync-1.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="A driver for NTPd for people who are firewall-challenged"
+HOMEPAGE="https://www.vanheusden.com/time/omnisync"
+LICENSE="GPL-2"
+SRC_URI="https://www.vanheusden.com/time/${PN}/${P}.tgz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="dev-libs/openssl:0= net-analyzer/net-snmp:="
+DEPEND="${RDEPEND}"
+DOCS=( readme.txt Changes )
+
+src_prepare() {
+ default
+ tc-export CC
+ sed -i -e 's/-O2 -Wall/-Wall/' -e 's/-lsnmp/-lnetsnmp/' "${S%/}/Makefile" || die
+ use debug || sed -i -e 's/$(DEBUG)//' "${S%/}/Makefile" || die
+}
+
+src_install() {
+ dosbin omnisync
+ newinitd "${FILESDIR%/}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR%/}/${PN}.confd" ${PN}
+ einstalldocs
+}
+
+pkg_postinst() {
+ local isConfigured=$(grep 'OMNISYNC_MODE=""' "${ROOT%/}/etc/conf.d/${PN}")
+ if [[ -n "${isConfigured}" ]] ; then
+ elog "Be sure to configure ${PN} in ${ROOT%/}/etc/conf.d before trying to start the service"
+ fi
+}