summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAisha Tammy <gentoo@aisha.cc>2020-12-13 14:55:25 -0500
committerJoonas Niilola <juippis@gentoo.org>2020-12-17 16:12:08 +0200
commitcc0a23a9d13329cc5d45b264c5733fec394fc877 (patch)
treea84a28e46f89ffbf13615eed8836c7e4a52b0cde /net-misc/openntpd
parentnet-proxy/mitmproxy: Bump to 6.0.1 (diff)
downloadgentoo-cc0a23a9d13329cc5d45b264c5733fec394fc877.tar.gz
gentoo-cc0a23a9d13329cc5d45b264c5733fec394fc877.tar.bz2
gentoo-cc0a23a9d13329cc5d45b264c5733fec394fc877.zip
net-misc/openntpd: version bump to 6.8_p1
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Aisha Tammy <gentoo@aisha.cc> Closes: https://github.com/gentoo/gentoo/pull/18643 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-misc/openntpd')
-rw-r--r--net-misc/openntpd/Manifest1
-rw-r--r--net-misc/openntpd/openntpd-6.8_p1.ebuild65
2 files changed, 66 insertions, 0 deletions
diff --git a/net-misc/openntpd/Manifest b/net-misc/openntpd/Manifest
index c791dddbce4..1c1f8ae16b8 100644
--- a/net-misc/openntpd/Manifest
+++ b/net-misc/openntpd/Manifest
@@ -1 +1,2 @@
DIST openntpd-6.2p3.tar.gz 447586 BLAKE2B f81db876c01572f06b8fc24aabe8954b15287496e8c39c1ae81231ef01676fbe8c69c5cf517279e45510b6b1b5f4c5d0d09d7ce5fc220c7bf36763cf67623519 SHA512 56a04bfd8b161b365607673ac80086ff53ae943938fa49bf52edbc541432eca30730a46a4af581fe26ce3bbceb144cb25982a38959b7a3f9304c727fe60f9f50
+DIST openntpd-6.8p1.tar.gz 443997 BLAKE2B 5b86c79ff2f822aba652da92325ad18803233c8b1548203c82603b99d2c41dce012dfb2be67828cc892559f323b764cc1711202fd85bc1d5d755b5e677406b98 SHA512 200056bedb9c757aae1ce5d3f6655175ec058cb479429fe4704955f3a3fa15e8a9cb578ae4898ddb4cfc08c9742bbab6a7c92b5e569f06a148e40c448360b58f
diff --git a/net-misc/openntpd/openntpd-6.8_p1.ebuild b/net-misc/openntpd/openntpd-6.8_p1.ebuild
new file mode 100644
index 00000000000..ce6e6c78891
--- /dev/null
+++ b/net-misc/openntpd/openntpd-6.8_p1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+
+MY_P="${P/_p/p}"
+
+DESCRIPTION="Lightweight NTP server ported from OpenBSD"
+HOMEPAGE="http://www.openntpd.org/"
+SRC_URI="mirror://openbsd/OpenNTPD/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="libressl selinux"
+
+DEPEND="
+ !net-misc/ntp[-openntpd]
+ libressl? ( dev-libs/libressl:0= )"
+
+RDEPEND="
+ ${DEPEND}
+ acct-group/openntpd
+ acct-user/openntpd
+ selinux? ( sec-policy/selinux-ntp )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+
+ # fix /run path
+ sed -i 's:/var/run/ntpd:/run/ntpd:g' src/ntpctl.8 src/ntpd.8 || die
+ sed -i 's:LOCALSTATEDIR "/run/ntpd:"/run/ntpd:' src/ntpd.h || die
+
+ # fix ntpd.drift path
+ sed -i 's:/var/db/ntpd.drift:/var/lib/openntpd/ntpd.drift:g' src/ntpd.8 || die
+ sed -i 's:"/db/ntpd.drift":"/openntpd/ntpd.drift":' src/ntpd.h || die
+
+ # fix default config to use gentoo pool
+ sed -i 's:^server:#server:g' ntpd.conf || die
+ printf "\n# Choose servers announced from Gentoo NTP Pool\nservers 0.gentoo.pool.ntp.org\nservers 1.gentoo.pool.ntp.org\nservers 2.gentoo.pool.ntp.org\nservers 3.gentoo.pool.ntp.org\n" >> ntpd.conf || die
+
+ # disable constraint config if libressl not enabled
+ use libressl || sed -ie 's/^constraints/#constraints/g' ntpd.conf || die
+}
+
+src_configure() {
+ econf \
+ --with-privsep-user=openntpd \
+ $(use_enable libressl https-constraint)
+}
+
+src_install() {
+ default
+
+ rm -r "${ED}"/var || die
+
+ newinitd "${FILESDIR}/${PN}.init.d-20080406-r6" ntpd
+ newconfd "${FILESDIR}/${PN}.conf.d-20080406-r6" ntpd
+
+ systemd_newunit "${FILESDIR}/${PN}.service-20080406-r4" ntpd.service
+}