/[gentoo-x86]/net-misc/chrony/chrony-2.0.ebuild
Gentoo

Contents of /net-misc/chrony/chrony-2.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Aug 8 07:05:32 2015 UTC (4 years, 4 months ago) by jer
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Old.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key A792A613)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/chrony-2.0.ebuild,v 1.2 2015/05/11 04:36:03 jer Exp $
4
5 EAPI=5
6 inherit eutils systemd toolchain-funcs
7
8 DESCRIPTION="NTP client and server programs"
9 HOMEPAGE="http://chrony.tuxfamily.org/"
10 SRC_URI="http://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
11 LICENSE="GPL-2"
12 SLOT="0"
13
14 KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
15 IUSE="caps +cmdmon ipv6 libedit +ntp +phc +pps readline +refclock +rtc selinux +adns"
16 REQUIRED_USE="
17 ?? ( libedit readline )
18 "
19
20 CDEPEND="
21 caps? ( sys-libs/libcap )
22 libedit? ( dev-libs/libedit )
23 readline? ( >=sys-libs/readline-4.1-r4:= )
24 "
25 DEPEND="
26 ${CDEPEND}
27 sys-apps/texinfo
28 "
29 RDEPEND="
30 ${CDEPEND}
31 selinux? ( sec-policy/selinux-chronyd )
32 "
33
34 RESTRICT=test
35
36 S="${WORKDIR}/${P/_/-}"
37
38 src_prepare() {
39 sed -i \
40 -e 's:/etc/chrony\.:/etc/chrony/chrony.:g' \
41 -e 's:/var/run:/run:g' \
42 conf.c chrony.texi.in chrony.txt examples/* FAQ || die
43 }
44
45 src_configure() {
46 tc-export CC
47
48 local CHRONY_EDITLINE
49 # ./configure legend:
50 # --disable-readline : disable line editing entirely
51 # --without-readline : do not use sys-libs/readline (enabled by default)
52 # --without-editline : do not use dev-libs/libedit (enabled by default)
53 if ! use readline && ! use libedit; then
54 CHRONY_EDITLINE='--disable-readline'
55 else
56 CHRONY_EDITLINE+=" $(usex readline '' --without-readline)"
57 CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)"
58 fi
59
60 # not an autotools generated script
61 local CHRONY_CONFIGURE="
62 ./configure \
63 $(usex caps '' --disable-linuxcaps) \
64 $(usex cmdmon '' --disable-cmdmon) \
65 $(usex ipv6 '' --disable-ipv6) \
66 $(usex ntp '' --disable-ntp) \
67 $(usex phc '' --disable-phc) \
68 $(usex pps '' --disable-pps) \
69 $(usex rtc '' --disable-rtc) \
70 $(usex refclock '' --disable-refclock) \
71 $(usex adns '' --disable-asyncdns) \
72 ${CHRONY_EDITLINE} \
73 ${EXTRA_ECONF} \
74 --docdir=/usr/share/doc/${PF} \
75 --infodir=/usr/share/info \
76 --mandir=/usr/share/man \
77 --prefix=/usr \
78 --sysconfdir=/etc/chrony \
79 --disable-sechash \
80 --without-nss \
81 --without-tomcrypt
82 "
83
84 # print the ./configure call to aid in future debugging
85 einfo ${CHRONY_CONFIGURE}
86 bash ${CHRONY_CONFIGURE} || die
87 }
88
89 src_compile() {
90 emake all docs
91 }
92
93 src_install() {
94 default
95 rm "${D}"/usr/share/doc/${PF}/COPYING || die
96 doinfo chrony.info*
97
98 newinitd "${FILESDIR}"/chronyd.init chronyd
99 newconfd "${FILESDIR}"/chronyd.conf chronyd
100
101 insinto /etc/${PN}
102 newins examples/chrony.conf.example3 chrony.conf
103 newins examples/chrony.keys.example chrony.keys
104
105 dodoc examples/*.example*
106
107 keepdir /var/{lib,log}/chrony
108
109 insinto /etc/logrotate.d
110 newins "${FILESDIR}"/chrony.logrotate chrony
111
112 systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service
113 systemd_enable_ntpunit 50-chrony chronyd.service
114 }

  ViewVC Help
Powered by ViewVC 1.1.20