1 |
commit: 1585238a7ef26c4a913781265e82a54c0fb5414c |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 2 10:15:10 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 2 10:43:30 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1585238a |
7 |
|
8 |
net-misc/chrony: fix live ebuild |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
net-misc/chrony/chrony-4.0_pre2-r1.ebuild | 29 +++++++++++++++-- |
14 |
net-misc/chrony/chrony-9999.ebuild | 52 ++++++++++++++++++++++++------- |
15 |
2 files changed, 67 insertions(+), 14 deletions(-) |
16 |
|
17 |
diff --git a/net-misc/chrony/chrony-4.0_pre2-r1.ebuild b/net-misc/chrony/chrony-4.0_pre2-r1.ebuild |
18 |
index 503840b2754..322eeb92494 100644 |
19 |
--- a/net-misc/chrony/chrony-4.0_pre2-r1.ebuild |
20 |
+++ b/net-misc/chrony/chrony-4.0_pre2-r1.ebuild |
21 |
@@ -6,20 +6,33 @@ inherit systemd tmpfiles toolchain-funcs |
22 |
|
23 |
DESCRIPTION="NTP client and server programs" |
24 |
HOMEPAGE="https://chrony.tuxfamily.org/" |
25 |
-SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz" |
26 |
+ |
27 |
+if [[ ${PV} == "9999" ]]; then |
28 |
+ EGIT_REPO_URI="https://git.tuxfamily.org/chrony/chrony.git" |
29 |
+ |
30 |
+ inherit git-r3 |
31 |
+else |
32 |
+ SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz" |
33 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
34 |
+fi |
35 |
+ |
36 |
LICENSE="GPL-2" |
37 |
SLOT="0" |
38 |
|
39 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
40 |
IUSE=" |
41 |
+adns +caps +cmdmon html ipv6 libedit +nettle +ntp +phc pps readline +refclock +rtc |
42 |
+seccomp +sechash selinux |
43 |
" |
44 |
+ |
45 |
REQUIRED_USE=" |
46 |
?? ( libedit readline ) |
47 |
sechash? ( nettle ) |
48 |
" |
49 |
|
50 |
+RESTRICT=test |
51 |
+ |
52 |
+BDEPEND="" |
53 |
+ |
54 |
CDEPEND=" |
55 |
caps? ( acct-group/ntp acct-user/ntp sys-libs/libcap ) |
56 |
libedit? ( dev-libs/libedit ) |
57 |
@@ -27,17 +40,21 @@ CDEPEND=" |
58 |
readline? ( >=sys-libs/readline-4.1-r4:= ) |
59 |
seccomp? ( sys-libs/libseccomp ) |
60 |
" |
61 |
+ |
62 |
DEPEND=" |
63 |
${CDEPEND} |
64 |
html? ( dev-ruby/asciidoctor ) |
65 |
pps? ( net-misc/pps-tools ) |
66 |
" |
67 |
+ |
68 |
RDEPEND=" |
69 |
${CDEPEND} |
70 |
selinux? ( sec-policy/selinux-chronyd ) |
71 |
" |
72 |
|
73 |
-RESTRICT=test |
74 |
+if [[ ${PV} == "9999" ]]; then |
75 |
+ BDEPEND+=" virtual/w3m" |
76 |
+fi |
77 |
|
78 |
S="${WORKDIR}/${P/_/-}" |
79 |
|
80 |
@@ -48,6 +65,7 @@ PATCHES=( |
81 |
|
82 |
src_prepare() { |
83 |
default |
84 |
+ |
85 |
sed -i \ |
86 |
-e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \ |
87 |
doc/* examples/* || die |
88 |
@@ -117,6 +135,11 @@ src_configure() { |
89 |
} |
90 |
|
91 |
src_compile() { |
92 |
+ if [[ ${PV} == "9999" ]]; then |
93 |
+ # uses w3m |
94 |
+ emake -C doc man txt |
95 |
+ fi |
96 |
+ |
97 |
emake all docs $(usex html '' 'ADOC=true') |
98 |
} |
99 |
|
100 |
|
101 |
diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild |
102 |
index 06eeb9fa032..322eeb92494 100644 |
103 |
--- a/net-misc/chrony/chrony-9999.ebuild |
104 |
+++ b/net-misc/chrony/chrony-9999.ebuild |
105 |
@@ -2,39 +2,60 @@ |
106 |
# Distributed under the terms of the GNU General Public License v2 |
107 |
|
108 |
EAPI=7 |
109 |
-inherit git-r3 tmpfiles systemd toolchain-funcs |
110 |
+inherit systemd tmpfiles toolchain-funcs |
111 |
|
112 |
DESCRIPTION="NTP client and server programs" |
113 |
HOMEPAGE="https://chrony.tuxfamily.org/" |
114 |
-EGIT_REPO_URI="https://git.tuxfamily.org/chrony/chrony.git/" |
115 |
+ |
116 |
+if [[ ${PV} == "9999" ]]; then |
117 |
+ EGIT_REPO_URI="https://git.tuxfamily.org/chrony/chrony.git" |
118 |
+ |
119 |
+ inherit git-r3 |
120 |
+else |
121 |
+ SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz" |
122 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
123 |
+fi |
124 |
+ |
125 |
LICENSE="GPL-2" |
126 |
SLOT="0" |
127 |
|
128 |
-KEYWORDS="" |
129 |
IUSE=" |
130 |
- +adns +caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc |
131 |
- +seccomp selinux |
132 |
+ +adns +caps +cmdmon html ipv6 libedit +nettle +ntp +phc pps readline +refclock +rtc |
133 |
+ +seccomp +sechash selinux |
134 |
" |
135 |
+ |
136 |
REQUIRED_USE=" |
137 |
?? ( libedit readline ) |
138 |
+ sechash? ( nettle ) |
139 |
" |
140 |
|
141 |
+RESTRICT=test |
142 |
+ |
143 |
+BDEPEND="" |
144 |
+ |
145 |
CDEPEND=" |
146 |
caps? ( acct-group/ntp acct-user/ntp sys-libs/libcap ) |
147 |
libedit? ( dev-libs/libedit ) |
148 |
+ nettle? ( dev-libs/nettle:= ) |
149 |
readline? ( >=sys-libs/readline-4.1-r4:= ) |
150 |
seccomp? ( sys-libs/libseccomp ) |
151 |
" |
152 |
+ |
153 |
DEPEND=" |
154 |
${CDEPEND} |
155 |
- dev-ruby/asciidoctor |
156 |
+ html? ( dev-ruby/asciidoctor ) |
157 |
pps? ( net-misc/pps-tools ) |
158 |
" |
159 |
+ |
160 |
RDEPEND=" |
161 |
${CDEPEND} |
162 |
selinux? ( sec-policy/selinux-chronyd ) |
163 |
" |
164 |
-RESTRICT=test |
165 |
+ |
166 |
+if [[ ${PV} == "9999" ]]; then |
167 |
+ BDEPEND+=" virtual/w3m" |
168 |
+fi |
169 |
+ |
170 |
S="${WORKDIR}/${P/_/-}" |
171 |
|
172 |
PATCHES=( |
173 |
@@ -44,6 +65,7 @@ PATCHES=( |
174 |
|
175 |
src_prepare() { |
176 |
default |
177 |
+ |
178 |
sed -i \ |
179 |
-e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \ |
180 |
doc/* examples/* || die |
181 |
@@ -88,15 +110,16 @@ src_configure() { |
182 |
$(usex caps '' --disable-linuxcaps) |
183 |
$(usex cmdmon '' --disable-cmdmon) |
184 |
$(usex ipv6 '' --disable-ipv6) |
185 |
+ $(usex nettle '' --without-nettle) |
186 |
$(usex ntp '' --disable-ntp) |
187 |
$(usex phc '' --disable-phc) |
188 |
$(usex pps '' --disable-pps) |
189 |
$(usex refclock '' --disable-refclock) |
190 |
$(usex rtc '' --disable-rtc) |
191 |
+ $(usex sechash '' --disable-sechash) |
192 |
${CHRONY_EDITLINE} |
193 |
${EXTRA_ECONF} |
194 |
--chronysockdir="${EPREFIX}/run/chrony" |
195 |
- --disable-sechash |
196 |
--docdir="${EPREFIX}/usr/share/doc/${PF}" |
197 |
--mandir="${EPREFIX}/usr/share/man" |
198 |
--prefix="${EPREFIX}/usr" |
199 |
@@ -112,7 +135,12 @@ src_configure() { |
200 |
} |
201 |
|
202 |
src_compile() { |
203 |
- emake all docs |
204 |
+ if [[ ${PV} == "9999" ]]; then |
205 |
+ # uses w3m |
206 |
+ emake -C doc man txt |
207 |
+ fi |
208 |
+ |
209 |
+ emake all docs $(usex html '' 'ADOC=true') |
210 |
} |
211 |
|
212 |
src_install() { |
213 |
@@ -129,8 +157,10 @@ src_install() { |
214 |
|
215 |
newtmpfiles - chronyd.conf <<<"d /run/chrony 0750 $(usex caps 'ntp ntp' 'root root')" |
216 |
|
217 |
- docinto html |
218 |
- dodoc doc/*.html |
219 |
+ if use html; then |
220 |
+ docinto html |
221 |
+ dodoc doc/*.html |
222 |
+ fi |
223 |
|
224 |
keepdir /var/{lib,log}/chrony |