summaryrefslogtreecommitdiff
blob: 4facafb92a0fb65ff70a98dc87aaaa850827a6d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Daniel Robbins <drobbins@gentoo.org>, Parag Mehta <pm@gnuos.org>
# $Header: /var/cvsroot/gentoo-x86/net-misc/bind/bind-9.1.3-r7.ebuild,v 1.1 2002/02/09 01:08:04 woodchip Exp $

A=${P}.tar.gz
S=${WORKDIR}/${P}
DESCRIPTION="Bind - Name Server"
SRC_URI="ftp://ftp.isc.org/isc/bind9/${PV}/${A}"
HOMEPAGE="http://www.isc.org/products/BIND"

DEPEND="virtual/glibc sys-apps/groff"
RDEPEND="virtual/glibc"

src_unpack() {
	unpack ${A}
	cd ${S}/doc/man
	#fix man pages to reflect Gentoo Linux file locations (drobbins)
	local x
	for x in */*
	do
		cp ${x} ${x}.orig
		sed -e 's:/etc/named.conf:/etc/bind/named.conf:g' -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' ${x}.orig > ${x}
		rm ${x}.orig
	done
}

src_compile() {                           
	./configure --prefix=/usr --host=${CHOST} --sysconfdir=/etc/bind --localstatedir=/var --with-libtool || die
	make all || die
}

src_install() {
	make DESTDIR=${D} install || die
	doman doc/man/*/*.[1-8]

	dodoc CHANGES COPYRIGHT FAQ README
	docinto misc ; dodoc doc/misc/*
	docinto html ; dodoc doc/arm/*
	docinto contrib ; dodoc contrib/named-bootconf/named-bootconf.sh \
		contrib/nanny/nanny.pl

	# some handy-dandy dynamic dns examples
	cd ${D}/usr/share/doc/${PF}
	tar pjxf ${FILESDIR}/dyndns-samples.tbz2

	dodir /etc/bind /var/bind /var/bind/pri /var/bind/sec /var/run/named
	chown named.named ${D}/var/run/named
	chmod 0770 ${D}/var/run/named

	insinto /var/bind ; doins ${FILESDIR}/root.cache
	insinto /var/bind/pri ; doins ${FILESDIR}/localhost
	insinto /var/bind/pri ; doins ${FILESDIR}/127.0.0

	exeinto /etc/init.d ; newexe ${FILESDIR}/named.rc6 named
}