1 |
commit: 3c1b2ede04fd5a8bc278ca8c25be4aa837f02f91 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 5 01:50:59 2018 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 5 01:50:59 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c1b2ede |
7 |
|
8 |
net-misc/ntpsec: version bump to 1.1.2, bug #665188 |
9 |
|
10 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
11 |
|
12 |
net-misc/ntpsec/Manifest | 1 + |
13 |
net-misc/ntpsec/ntpsec-1.1.2.ebuild | 154 ++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 155 insertions(+) |
15 |
|
16 |
diff --git a/net-misc/ntpsec/Manifest b/net-misc/ntpsec/Manifest |
17 |
index c6ff344b44b..b5913390c2d 100644 |
18 |
--- a/net-misc/ntpsec/Manifest |
19 |
+++ b/net-misc/ntpsec/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST ntpsec-1.0.0.tar.gz 2405862 BLAKE2B b1631491500cafa5d41761fe6cb2db523450ed7801d06678048d6b8878d93dbd1e9d7cb2081a8400421213cf78a6724220236149a7f719896d1e8e48f5337d85 SHA512 9fb06310508b30d2ae2d66212d7d87b00e8eea294cebc27eb70435d764bd639fcec234b66e78deafb700476c88e47afe2d1b463563008c32efbb0644dd611f43 |
22 |
DIST ntpsec-1.1.1.tar.gz 2451415 BLAKE2B 516c87f0710ecacfde27f801a5fc4a492e7871eb35cc3afb8a107e0c381cd9787a4af2d0b01e2cf5d4f43043afe042321e5bbd2299578723e870b2fa502646d2 SHA512 838ed81c94e14a3d8588670ce63a1c4f6216d2f79be5149ad6a845cec00bdf6d7fe77310ce9c33c4675d3db54e59c3d9d02ae4351913ffbd9a3883716c443f83 |
23 |
+DIST ntpsec-1.1.2.tar.gz 2458805 BLAKE2B e9ab493f60179ce94a5995287423c3a0038298b622b0dcffd5a299261a7b42fc8d0d04256726e049c625c0789882f601615eaa7169047e984a274f62e0cf40d2 SHA512 83d2d3bc59202f1e5f3e76eeb6810e575e24c6f392f20c25732a6881a0a0a9f72453b76b294399351ec4baf88bc64da089dc1340aee38576021659f81bcd0e19 |
24 |
|
25 |
diff --git a/net-misc/ntpsec/ntpsec-1.1.2.ebuild b/net-misc/ntpsec/ntpsec-1.1.2.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..680e3dcba1d |
28 |
--- /dev/null |
29 |
+++ b/net-misc/ntpsec/ntpsec-1.1.2.ebuild |
30 |
@@ -0,0 +1,154 @@ |
31 |
+# Copyright 1999-2018 Gentoo Foundation |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=6 |
35 |
+ |
36 |
+PYTHON_COMPAT=( python2_7 python3_{4,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}" |
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 |
+ |
178 |
+pkg_postinst() { |
179 |
+ einfo "If you want to serve time on your local network, then" |
180 |
+ einfo "you should disable all the ref_clocks unless you have" |
181 |
+ einfo "one and can get stable time from it. Feel free to try" |
182 |
+ einfo "it but PPS probably won't work unless you have a UART" |
183 |
+ einfo "GPS that actually provides PPS messages." |
184 |
+} |