1 |
commit: dcf3807e8b2360c73720e1e2ef23bc82553d234c |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 5 18:42:58 2017 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 5 18:43:30 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcf3807e |
7 |
|
8 |
net-misc/chrony: Add USE=seccomp by Luis Ressel (bug #620936). |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
|
12 |
net-misc/chrony/chrony-3.1-r1.ebuild | 121 +++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 121 insertions(+) |
14 |
|
15 |
diff --git a/net-misc/chrony/chrony-3.1-r1.ebuild b/net-misc/chrony/chrony-3.1-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..5b12587e50a |
18 |
--- /dev/null |
19 |
+++ b/net-misc/chrony/chrony-3.1-r1.ebuild |
20 |
@@ -0,0 +1,121 @@ |
21 |
+# Copyright 1999-2017 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=6 |
25 |
+inherit eutils systemd toolchain-funcs |
26 |
+ |
27 |
+DESCRIPTION="NTP client and server programs" |
28 |
+HOMEPAGE="http://chrony.tuxfamily.org/" |
29 |
+SRC_URI="http://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz" |
30 |
+LICENSE="GPL-2" |
31 |
+SLOT="0" |
32 |
+ |
33 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64" |
34 |
+IUSE="caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc seccomp selinux +adns" |
35 |
+REQUIRED_USE=" |
36 |
+ ?? ( libedit readline ) |
37 |
+" |
38 |
+ |
39 |
+CDEPEND=" |
40 |
+ caps? ( sys-libs/libcap ) |
41 |
+ libedit? ( dev-libs/libedit ) |
42 |
+ readline? ( >=sys-libs/readline-4.1-r4:= ) |
43 |
+ seccomp? ( sys-libs/libseccomp ) |
44 |
+" |
45 |
+DEPEND=" |
46 |
+ ${CDEPEND} |
47 |
+ html? ( dev-ruby/asciidoctor ) |
48 |
+ pps? ( net-misc/pps-tools ) |
49 |
+" |
50 |
+RDEPEND=" |
51 |
+ ${CDEPEND} |
52 |
+ selinux? ( sec-policy/selinux-chronyd ) |
53 |
+" |
54 |
+ |
55 |
+RESTRICT=test |
56 |
+ |
57 |
+S="${WORKDIR}/${P/_/-}" |
58 |
+ |
59 |
+src_prepare() { |
60 |
+ sed -i \ |
61 |
+ -e 's:/etc/chrony\.:/etc/chrony/chrony.:g' \ |
62 |
+ -e 's:/var/run:/run:g' \ |
63 |
+ conf.c doc/*.man.in examples/* || die |
64 |
+ |
65 |
+ default |
66 |
+} |
67 |
+ |
68 |
+src_configure() { |
69 |
+ tc-export CC |
70 |
+ |
71 |
+ local CHRONY_EDITLINE |
72 |
+ # ./configure legend: |
73 |
+ # --disable-readline : disable line editing entirely |
74 |
+ # --without-readline : do not use sys-libs/readline (enabled by default) |
75 |
+ # --without-editline : do not use dev-libs/libedit (enabled by default) |
76 |
+ if ! use readline && ! use libedit; then |
77 |
+ CHRONY_EDITLINE='--disable-readline' |
78 |
+ else |
79 |
+ CHRONY_EDITLINE+=" $(usex readline '' --without-readline)" |
80 |
+ CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)" |
81 |
+ fi |
82 |
+ |
83 |
+ # not an autotools generated script |
84 |
+ local CHRONY_CONFIGURE=" |
85 |
+ ./configure \ |
86 |
+ $(use_enable seccomp scfilter) \ |
87 |
+ $(usex adns '' --disable-asyncdns) \ |
88 |
+ $(usex caps '' --disable-linuxcaps) \ |
89 |
+ $(usex cmdmon '' --disable-cmdmon) \ |
90 |
+ $(usex ipv6 '' --disable-ipv6) \ |
91 |
+ $(usex ntp '' --disable-ntp) \ |
92 |
+ $(usex phc '' --disable-phc) \ |
93 |
+ $(usex pps '' --disable-pps) \ |
94 |
+ $(usex refclock '' --disable-refclock) \ |
95 |
+ $(usex rtc '' --disable-rtc) \ |
96 |
+ ${CHRONY_EDITLINE} \ |
97 |
+ ${EXTRA_ECONF} \ |
98 |
+ --docdir=/usr/share/doc/${PF} \ |
99 |
+ --chronysockdir=/run/chrony \ |
100 |
+ --mandir=/usr/share/man \ |
101 |
+ --prefix=/usr \ |
102 |
+ --sysconfdir=/etc/chrony \ |
103 |
+ --disable-sechash \ |
104 |
+ --without-nss \ |
105 |
+ --without-tomcrypt |
106 |
+ " |
107 |
+ |
108 |
+ # print the ./configure call to aid in future debugging |
109 |
+ einfo ${CHRONY_CONFIGURE} |
110 |
+ bash ${CHRONY_CONFIGURE} || die |
111 |
+} |
112 |
+ |
113 |
+src_compile() { |
114 |
+ emake all docs $(usex html '' 'ADOC=true') |
115 |
+} |
116 |
+ |
117 |
+src_install() { |
118 |
+ default |
119 |
+ |
120 |
+ newinitd "${FILESDIR}"/chronyd.init-r1 chronyd |
121 |
+ newconfd "${FILESDIR}"/chronyd.conf chronyd |
122 |
+ |
123 |
+ insinto /etc/${PN} |
124 |
+ newins examples/chrony.conf.example1 chrony.conf |
125 |
+ |
126 |
+ docinto examples |
127 |
+ dodoc examples/*.example* |
128 |
+ |
129 |
+ if use html; then |
130 |
+ docinto html |
131 |
+ dodoc doc/*.html |
132 |
+ fi |
133 |
+ |
134 |
+ keepdir /var/{lib,log}/chrony |
135 |
+ |
136 |
+ insinto /etc/logrotate.d |
137 |
+ newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony |
138 |
+ |
139 |
+ systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service |
140 |
+ systemd_enable_ntpunit 50-chrony chronyd.service |
141 |
+} |