summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2020-08-23 18:35:42 +0200
committerConrad Kostecki <conikost@gentoo.org>2020-08-23 19:21:43 +0200
commiteaff0feca38973b7a2828ce835323b1a160a9a10 (patch)
tree0440f4bd7dca683178f025af7fabad82fe4baf2a /net-misc
parentnet-misc/ntpclient: rename to net-misc/sntpd (diff)
downloadgentoo-eaff0feca38973b7a2828ce835323b1a160a9a10.tar.gz
gentoo-eaff0feca38973b7a2828ce835323b1a160a9a10.tar.bz2
gentoo-eaff0feca38973b7a2828ce835323b1a160a9a10.zip
net-misc/sntpd: bump to version 3.0
Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/sntpd/Manifest1
-rw-r--r--net-misc/sntpd/files/sntpd.confd5
-rw-r--r--net-misc/sntpd/files/sntpd.initd13
-rw-r--r--net-misc/sntpd/metadata.xml1
-rw-r--r--net-misc/sntpd/sntpd-3.0.ebuild33
5 files changed, 53 insertions, 0 deletions
diff --git a/net-misc/sntpd/Manifest b/net-misc/sntpd/Manifest
index ee7f4f690cd4..f10c074aef37 100644
--- a/net-misc/sntpd/Manifest
+++ b/net-misc/sntpd/Manifest
@@ -1 +1,2 @@
DIST ntpclient-2018_244.tar.xz 108056 BLAKE2B 52c554fe238521e8820111a19220a532406137b2e21c67558fd8252ea2e4d60a7827f4acd1a2868f7a7f6f09c7b25c4267f4cd28773088a12132fa580b02bb4c SHA512 4c1c7e1088365679182507e21386bcf670713aed4b636687fbbe226219fdcbc25e27e2369912a78c662058cba9b6b409fb90978315806a3ed5ea59c70133e4bc
+DIST sntpd-3.0.tar.gz 151995 BLAKE2B a67615c874fd119e083d99d269a92a550d875a18a973e0b2904cab1fe6631b6c4e98d86959fbd9c1a387396f1854ed1c264920e2b40e6355871cbc8a4e40a4b5 SHA512 664e95e590b329dc847275c99829711c159bf91fadb2a90989c2706fbd8b074480146a7a05c5532a1bbfcaebd4b489262a44e418fa8ac57362c4f7db659fd1ea
diff --git a/net-misc/sntpd/files/sntpd.confd b/net-misc/sntpd/files/sntpd.confd
new file mode 100644
index 000000000000..ef7a12ef8a43
--- /dev/null
+++ b/net-misc/sntpd/files/sntpd.confd
@@ -0,0 +1,5 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Additional command line options
+SNTPD_OPTS="-s 0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
diff --git a/net-misc/sntpd/files/sntpd.initd b/net-misc/sntpd/files/sntpd.initd
new file mode 100644
index 000000000000..2e4c0652c940
--- /dev/null
+++ b/net-misc/sntpd/files/sntpd.initd
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="sntpd"
+pidfile="/run/sntpd.pid"
+
+command="/usr/sbin/sntpd"
+command_args="${SNTPD_OPTS}"
+
+depend() {
+ use net dns logger
+}
diff --git a/net-misc/sntpd/metadata.xml b/net-misc/sntpd/metadata.xml
index 3582e10f27d3..0d0a5d1ae349 100644
--- a/net-misc/sntpd/metadata.xml
+++ b/net-misc/sntpd/metadata.xml
@@ -18,6 +18,7 @@
<remote-id type="github">troglobit/sntpd</remote-id>
</upstream>
<use>
+ <flag name="adjtimex">Install adjtimex for the clock adjustment algorithm.</flag>
<flag name="debug">Enable analysis code path and debugging of NTP protocol.</flag>
<flag name="embedded">Build a very small ntpclient, from OpenWRT project.</flag>
<flag name="obsolete">Enable obsolete features, to use with kernel versions older than 3.0</flag>
diff --git a/net-misc/sntpd/sntpd-3.0.ebuild b/net-misc/sntpd/sntpd-3.0.ebuild
new file mode 100644
index 000000000000..4b7079d372b3
--- /dev/null
+++ b/net-misc/sntpd/sntpd-3.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="A NTP (RFC-1305 and RFC-4330) client and server for unix-alike systems"
+HOMEPAGE="https://github.com/troglobit/sntpd"
+SRC_URI="https://github.com/troglobit/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="adjtimex systemd"
+
+RDEPEND="systemd? ( sys-apps/systemd )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with adjtimex)
+ $(use_with systemd systemd $(systemd_get_systemunitdir))
+ --with-ntpclient
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/sntpd.initd sntpd
+ newconfd "${FILESDIR}"/sntpd.confd sntpd
+}