Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/
Date: Thu, 04 Jul 2019 15:50:21
Message-Id: 1562255397.c6e0de1f8424742a6507c2643b4557017dde08f0.blueness@gentoo
1 commit: c6e0de1f8424742a6507c2643b4557017dde08f0
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 4 15:48:40 2019 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 4 15:49:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6e0de1f
7
8 net-misc/ntpsec: version bump to 1.1.4, bug #688494
9
10 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
11 Package-Manager: Portage-2.3.66, Repoman-2.3.11
12
13 net-misc/ntpsec/Manifest | 1 +
14 net-misc/ntpsec/ntpsec-1.1.4.ebuild | 157 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 158 insertions(+)
16
17 diff --git a/net-misc/ntpsec/Manifest b/net-misc/ntpsec/Manifest
18 index 15b045177f4..70b0a07f53e 100644
19 --- a/net-misc/ntpsec/Manifest
20 +++ b/net-misc/ntpsec/Manifest
21 @@ -1 +1,2 @@
22 DIST ntpsec-1.1.3.tar.gz 2462330 BLAKE2B 903e569ad72939def9df31d7b51b2623b140754de67362213f39e39ad770d903d70c45a10a18e98ae35927792666ae27de40b41a5c0bfe6fd8cfa6a37102d4e8 SHA512 df60c5fa63d4c94529ba1e8b21c7d6b5d0c9fb810ed7546a621b072725a6ff03edbd2dcbc3baf19ac3b3a9b82d7aff3ddee4ab8c93559b7065ed06a211b538c4
23 +DIST ntpsec-1.1.4.tar.gz 2536268 BLAKE2B 320e7afee1b776e0327f8bf34bc0b8cd3a2c67fd9fd16564323ce825cb9e36d7d5fb48a38b734600286cbd039f41f296d9e488e25d2680f08412aa983101987b SHA512 1b74e7cb87e189137e1b66b52ce89498e0061a10abf017c36bfdecb4aefe9c3fb6e8fd7819a9f822fb946dca6ae20ee724b2aed35e03d73f8e3015d8818d02db
24
25 diff --git a/net-misc/ntpsec/ntpsec-1.1.4.ebuild b/net-misc/ntpsec/ntpsec-1.1.4.ebuild
26 new file mode 100644
27 index 00000000000..b227382f452
28 --- /dev/null
29 +++ b/net-misc/ntpsec/ntpsec-1.1.4.ebuild
30 @@ -0,0 +1,157 @@
31 +# Copyright 1999-2019 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +PYTHON_COMPAT=( python2_7 python3_{5,6} )
37 +PYTHON_REQ_USE='threads(+)'
38 +
39 +inherit flag-o-matic python-r1 waf-utils systemd user
40 +
41 +if [[ ${PV} == *9999* ]]; then
42 + inherit git-r3
43 + EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
44 + BDEPEND=""
45 + KEYWORDS=""
46 +else
47 + SRC_URI="ftp://ftp.ntpsec.org/pub/releases/${PN}-${PV}.tar.gz"
48 + RESTRICT="mirror"
49 + BDEPEND=""
50 + KEYWORDS="~amd64 ~arm ~arm64 ~x86"
51 +fi
52 +
53 +DESCRIPTION="The NTP reference implementation, refactored"
54 +HOMEPAGE="https://www.ntpsec.org/"
55 +
56 +NTPSEC_REFCLOCK=(
57 + oncore trimble truetime gpsd jjy generic spectracom
58 + shm pps hpgps zyfer arbiter nmea neoclock modem
59 + local)
60 +
61 +IUSE_NTPSEC_REFCLOCK=${NTPSEC_REFCLOCK[@]/#/rclock_}
62 +
63 +LICENSE="HPND MIT BSD-2 BSD CC-BY-SA-4.0"
64 +SLOT="0"
65 +IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early gdb heat libressl nist ntpviz samba seccomp smear tests" #ionice
66 +REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
67 +
68 +# net-misc/pps-tools oncore,pps
69 +CDEPEND="${PYTHON_DEPS}
70 + ${BDEPEND}
71 + sys-libs/libcap
72 + dev-python/psutil[${PYTHON_USEDEP}]
73 + libressl? ( dev-libs/libressl:0= )
74 + !libressl? ( dev-libs/openssl:0= )
75 + seccomp? ( sys-libs/libseccomp )
76 +"
77 +RDEPEND="${CDEPEND}
78 + ntpviz? ( sci-visualization/gnuplot media-fonts/liberation-fonts )
79 + !net-misc/ntp
80 + !net-misc/openntpd
81 +"
82 +DEPEND="${CDEPEND}
83 + app-text/asciidoc
84 + app-text/docbook-xsl-stylesheets
85 + sys-devel/bison
86 + rclock_oncore? ( net-misc/pps-tools )
87 + rclock_pps? ( net-misc/pps-tools )
88 +"
89 +
90 +WAF_BINARY="${S}/waf"
91 +
92 +pkg_setup() {
93 + enewgroup ntp 123
94 + enewuser ntp 123 -1 /dev/null ntp
95 +}
96 +
97 +src_prepare() {
98 + default
99 + # Remove autostripping of binaries
100 + sed -i -e '/Strip binaries/d' wscript
101 + python_copy_sources
102 +}
103 +
104 +src_configure() {
105 + is-flagq -flto* && filter-flags -flto* -fuse-linker-plugin
106 +
107 + local string_127=""
108 + local rclocks="";
109 + local CLOCKSTRING=""
110 +
111 + for refclock in ${NTPSEC_REFCLOCK[@]} ; do
112 + if use rclock_${refclock} ; then
113 + string_127+="$refclock,"
114 + fi
115 + done
116 + CLOCKSTRING="`echo ${string_127}|sed 's|,$||'`"
117 +
118 + local myconf=(
119 + --nopyc
120 + --nopyo
121 + --refclock="${CLOCKSTRING}"
122 + $(use doc && echo "--enable-doc")
123 + $(use early && echo "--enable-early-droproot")
124 + $(use gdb && echo "--enable-debug-gdb")
125 + $(use nist && echo "--enable-lockclock")
126 + $(use samba && echo "--enable-mssntp")
127 + $(use seccomp && echo "--enable-seccomp")
128 + $(use smear && echo "--enable-leap-smear")
129 + $(use tests && echo "--alltests")
130 + $(use debug && echo "--enable-debug")
131 + )
132 +
133 + python_configure() {
134 + waf-utils_src_configure "${myconf[@]}"
135 + }
136 + python_foreach_impl run_in_build_dir python_configure
137 +}
138 +
139 +src_compile() {
140 + unset MAKEOPTS
141 + python_compile() {
142 + waf-utils_src_compile
143 + }
144 + python_foreach_impl run_in_build_dir python_compile
145 +}
146 +
147 +src_install() {
148 + python_install() {
149 + waf-utils_src_install
150 + }
151 + python_foreach_impl run_in_build_dir python_install
152 +
153 + # Install heat generating scripts
154 + use heat && dosbin "${S}"/contrib/ntpheat{,usb}
155 +
156 + # Install the openrc files
157 + newinitd "${FILESDIR}"/ntpd.rc-r2 ntp
158 + newconfd "${FILESDIR}"/ntpd.confd ntp
159 +
160 + # Install the systemd unit file
161 + systemd_newunit "${FILESDIR}"/ntpd.service ntpd.service
162 +
163 + # Prepare a directory for the ntp.drift file
164 + mkdir -pv "${ED}"/var/lib/ntp
165 + chown ntp:ntp "${ED}"/var/lib/ntp
166 + chmod 770 "${ED}"/var/lib/ntp
167 + keepdir /var/lib/ntp
168 +
169 + # Install a log rotate script
170 + mkdir -pv "${ED}"/etc/logrotate.d
171 + cp -v "${S}"/etc/logrotate-config.ntpd "${ED}"/etc/logrotate.d/ntpd
172 +
173 + # Install the configuration file and sample configuration
174 + cp -v "${FILESDIR}"/ntp.conf "${ED}"/etc/ntp.conf
175 + cp -Rv "${S}"/etc/ntp.d/ "${ED}"/etc/
176 +
177 + # move doc files to /usr/share/doc/"${P}"
178 + use doc && mv -v "${ED}"/usr/share/doc/"${PN}" "${ED}"/usr/share/doc/"${P}"/html
179 +}
180 +
181 +pkg_postinst() {
182 + einfo "If you want to serve time on your local network, then"
183 + einfo "you should disable all the ref_clocks unless you have"
184 + einfo "one and can get stable time from it. Feel free to try"
185 + einfo "it but PPS probably won't work unless you have a UART"
186 + einfo "GPS that actually provides PPS messages."
187 +}