]> Pileus Git - ~andy/sunrise/blob - net-libs/ldns/ldns-1.6.1.ebuild
net-misc/gns3: Version bump, thanks to Tommy[D] and chithead for advice
[~andy/sunrise] / net-libs / ldns / ldns-1.6.1.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header$
4
5 DESCRIPTION="ldns is a library with the aim to simplify DNS programing in C"
6 HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/"
7 LICENSE="BSD"
8
9 IUSE="doc examples sha2 ssl"
10 KEYWORDS="~amd64 ~x86"
11 SLOT="0"
12 SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz"
13
14 RDEPEND="ssl? ( dev-libs/openssl )"
15 DEPEND="${RDEPEND}
16         doc? ( app-doc/doxygen )"
17
18 pkg_setup() {
19         if use sha2; then
20                 if ! use ssl; then
21                         die "For sha2 support, you have to enable ssl USE flag too"
22                 fi
23                 ewarn "You enabled sha2 USE flag, this is still experimental"
24         fi
25 }
26
27 src_compile() {
28         econf \
29         $(use_enable sha2) \
30         $(use_with ssl)
31
32         emake || die "emake failed"
33         if use doc; then
34                 emake doxygen || die "emake doc failed"
35         fi
36 }
37
38 src_install() {
39         emake DESTDIR="${D}" install || die "emake install failed"
40         dodoc Changelog README || die "dodoc failed"
41
42         if use examples; then
43                 docinto examples
44                 dodoc examples/* || die "dodoc for examples failed"
45         fi
46
47         if use doc; then
48                 dohtml doc/html/* || die "dohtml failed"
49         fi
50 }
51
52 pkg_postinst() {
53         einfo "The drill binary and the ldns-* utilities were moved into their own"
54         einfo "package. If you need them, install net-dns/ldns-utils."
55 }