1 |
# Copyright 1999-2003 Gentoo Technologies, Inc. |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /home/cvsroot/gentoo-x86/net-misc/chrony/chrony-1.18.ebuild,v 1.9 2003/02/13 14:46:51 vapier Exp $ |
4 |
|
5 |
IUSE="readline" |
6 |
|
7 |
S=${WORKDIR}/${P} |
8 |
DESCRIPTION="NTP client and server programs" |
9 |
SRC_URI="http://chrony.sunsite.dk/download/${P}.tar.gz" |
10 |
HOMEPAGE="http://chrony.sunsite.dk" |
11 |
LICENSE="GPL-2" |
12 |
SLOT="0" |
13 |
KEYWORDS="x86 sparc " |
14 |
|
15 |
DEPEND="virtual/glibc |
16 |
readline? ( >=readline-4.1-r4 )" |
17 |
RDEPEND=$DEPEND |
18 |
|
19 |
# Patch the distribution so that it puts stuff in /etc/chrony/ by default |
20 |
src_unpack() { |
21 |
unpack ${A} |
22 |
cd ${S} |
23 |
cp conf.c conf.c.orig |
24 |
patch -p0 < ${FILESDIR}/${P}-conf.c-gentoo.diff |
25 |
cd examples |
26 |
cp chrony.conf.example chrony.conf.example.orig |
27 |
patch -p0 < ${FILESDIR}/${P}-chrony.conf.example-gentoo.diff |
28 |
} |
29 |
|
30 |
src_compile() { |
31 |
|
32 |
local myconf |
33 |
|
34 |
use readline || myconf="--disable-readline" |
35 |
|
36 |
./configure \ |
37 |
--prefix=/usr \ |
38 |
--infodir=/usr/share/info \ |
39 |
--mandir=/usr/share/man \ |
40 |
$myconf || die "./configure failed" |
41 |
|
42 |
emake all docs || die |
43 |
} |
44 |
|
45 |
src_install () { |
46 |
# the chrony install is brain-dead so we'll |
47 |
# just do it ourselves. |
48 |
|
49 |
dobin chronyc |
50 |
dosbin chronyd |
51 |
|
52 |
# documentation |
53 |
dodoc chrony.txt chrony.html COPYING README |
54 |
|
55 |
# man pages |
56 |
doman *.{1,5,8} |
57 |
|
58 |
# info files |
59 |
doinfo chrony.info* |
60 |
|
61 |
# example configuration files |
62 |
dodoc examples/chrony.conf.example |
63 |
dodoc examples/chrony.keys.example |
64 |
|
65 |
# system configuration |
66 |
exeinto /etc/init.d ; newexe ${FILESDIR}/chronyd.rc chronyd |
67 |
dodir /etc/chrony |
68 |
} |