1 |
commit: 6eb170217d70df674dccf0973f6d933c8e88305a |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 1 19:10:14 2018 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 1 19:10:14 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6eb17021 |
7 |
|
8 |
net-misc/omnisync: New package |
9 |
|
10 |
Driver for NTPd for people who are firewall-challenged |
11 |
|
12 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
13 |
|
14 |
net-misc/omnisync/Manifest | 1 + |
15 |
net-misc/omnisync/files/omnisync.confd | 21 ++++++++++++++++++ |
16 |
net-misc/omnisync/files/omnisync.initd | 20 +++++++++++++++++ |
17 |
net-misc/omnisync/metadata.xml | 8 +++++++ |
18 |
net-misc/omnisync/omnisync-1.0.ebuild | 40 ++++++++++++++++++++++++++++++++++ |
19 |
5 files changed, 90 insertions(+) |
20 |
|
21 |
diff --git a/net-misc/omnisync/Manifest b/net-misc/omnisync/Manifest |
22 |
new file mode 100644 |
23 |
index 00000000000..176a959130c |
24 |
--- /dev/null |
25 |
+++ b/net-misc/omnisync/Manifest |
26 |
@@ -0,0 +1 @@ |
27 |
+DIST omnisync-1.0.tgz 27725 BLAKE2B 00e546e3a04c8483f4a3995207fe6715e25526ca639f517220725c31d50d1c01fe0d15927e11e84143f3b2c8aa80ede1317c818945f0249147548bb03d27f744 SHA512 742ffc0a85bd923b99ae7e4f50a6aaa29107eaa987039e902797c78a9673e914e1fa61b2484c6777f62b0caf8b3110a071fd103c8b18456083883df534a1ef4d |
28 |
|
29 |
diff --git a/net-misc/omnisync/files/omnisync.confd b/net-misc/omnisync/files/omnisync.confd |
30 |
new file mode 100644 |
31 |
index 00000000000..c2ab3cc58f0 |
32 |
--- /dev/null |
33 |
+++ b/net-misc/omnisync/files/omnisync.confd |
34 |
@@ -0,0 +1,21 @@ |
35 |
+# REQUIRED, must be one of time/tcp time/udp daytime/tcp daytime/udp http https |
36 |
+# snts irc icmp icmp snmp simpleptpl socks5sntp sntp |
37 |
+OMNISYNC_MODE="" |
38 |
+ |
39 |
+# Options to add |
40 |
+# -F x fudge factor (default: 0.000000) -m x max. offset (default: 7200.000000) |
41 |
+# -p x proxy-server (http/https/socks5sntp only) |
42 |
+# -B x bind to interface x (not for snmp) |
43 |
+# -I x username[:password] (irc/socks5 auth. only) |
44 |
+# -c x community (snmp only) |
45 |
+# -h x host to connect to |
46 |
+# -u x ntpd shared memory unit |
47 |
+# -z x do an initial step, to speed up syncing, parameter is number of samples-S x write measurements to file x |
48 |
+# -n do NOT submit to NTPd/set clock, query only (use in combination with -v and -f) |
49 |
+# -f do not fork |
50 |
+# -i x check interval (default: 60) |
51 |
+# -d x timeout |
52 |
+# -U x set user to run as |
53 |
+# -P x write pid to file x |
54 |
+# -v increase verbosity |
55 |
+OMNISYNC_ARGS="" |
56 |
|
57 |
diff --git a/net-misc/omnisync/files/omnisync.initd b/net-misc/omnisync/files/omnisync.initd |
58 |
new file mode 100644 |
59 |
index 00000000000..7820af6e94e |
60 |
--- /dev/null |
61 |
+++ b/net-misc/omnisync/files/omnisync.initd |
62 |
@@ -0,0 +1,20 @@ |
63 |
+#!/sbin/openrc-run |
64 |
+# Copyright 1999-2018 Gentoo Foundation |
65 |
+# Distributed under the terms of the GNU General Public License v2 |
66 |
+ |
67 |
+depend() { |
68 |
+ use net |
69 |
+} |
70 |
+ |
71 |
+command="/usr/sbin/omnisync" |
72 |
+command_args="-M ${OMNISYNC_MODE} ${OMNISYNC_ARGS}" |
73 |
+ |
74 |
+start_pre() { |
75 |
+ if [ -z "${OMNISYNC_MODE}" ] ; then |
76 |
+ eerror 'Configuration incomplete! OMNISYNC_MODE not set' |
77 |
+ return 1 |
78 |
+ fi |
79 |
+ return 0 |
80 |
+} |
81 |
+ |
82 |
+# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet: |
83 |
|
84 |
diff --git a/net-misc/omnisync/metadata.xml b/net-misc/omnisync/metadata.xml |
85 |
new file mode 100644 |
86 |
index 00000000000..b651dc535e3 |
87 |
--- /dev/null |
88 |
+++ b/net-misc/omnisync/metadata.xml |
89 |
@@ -0,0 +1,8 @@ |
90 |
+<?xml version="1.0" encoding="UTF-8"?> |
91 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
92 |
+<pkgmetadata> |
93 |
+<maintainer type="person"> |
94 |
+ <email>grknight@g.o</email> |
95 |
+ <name>Brian Evans</name> |
96 |
+</maintainer> |
97 |
+</pkgmetadata> |
98 |
|
99 |
diff --git a/net-misc/omnisync/omnisync-1.0.ebuild b/net-misc/omnisync/omnisync-1.0.ebuild |
100 |
new file mode 100644 |
101 |
index 00000000000..6c0ff7635dc |
102 |
--- /dev/null |
103 |
+++ b/net-misc/omnisync/omnisync-1.0.ebuild |
104 |
@@ -0,0 +1,40 @@ |
105 |
+# Copyright 1999-2018 Gentoo Foundation |
106 |
+# Distributed under the terms of the GNU General Public License v2 |
107 |
+ |
108 |
+EAPI=6 |
109 |
+ |
110 |
+inherit toolchain-funcs |
111 |
+ |
112 |
+DESCRIPTION="A driver for NTPd for people who are firewall-challenged" |
113 |
+HOMEPAGE="https://www.vanheusden.com/time/omnisync" |
114 |
+LICENSE="GPL-2" |
115 |
+SRC_URI="https://www.vanheusden.com/time/${PN}/${P}.tgz" |
116 |
+ |
117 |
+SLOT="0" |
118 |
+KEYWORDS="~amd64 ~x86" |
119 |
+IUSE="debug" |
120 |
+ |
121 |
+RDEPEND="dev-libs/openssl:0= net-analyzer/net-snmp:=" |
122 |
+DEPEND="${RDEPEND}" |
123 |
+DOCS=( readme.txt Changes ) |
124 |
+ |
125 |
+src_prepare() { |
126 |
+ default |
127 |
+ tc-export CC |
128 |
+ sed -i -e 's/-O2 -Wall/-Wall/' -e 's/-lsnmp/-lnetsnmp/' "${S%/}/Makefile" || die |
129 |
+ use debug || sed -i -e 's/$(DEBUG)//' "${S%/}/Makefile" || die |
130 |
+} |
131 |
+ |
132 |
+src_install() { |
133 |
+ dosbin omnisync |
134 |
+ newinitd "${FILESDIR%/}/${PN}.initd" ${PN} |
135 |
+ newconfd "${FILESDIR%/}/${PN}.confd" ${PN} |
136 |
+ einstalldocs |
137 |
+} |
138 |
+ |
139 |
+pkg_postinst() { |
140 |
+ local isConfigured=$(grep 'OMNISYNC_MODE=""' "${ROOT%/}/etc/conf.d/${PN}") |
141 |
+ if [[ -n "${isConfigured}" ]] ; then |
142 |
+ elog "Be sure to configure ${PN} in ${ROOT%/}/etc/conf.d before trying to start the service" |
143 |
+ fi |
144 |
+} |