/[gentoo-x86]/net-dns/unbound/unbound-1.4.12-r1.ebuild
Gentoo

Contents of /net-dns/unbound/unbound-1.4.12-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Dec 26 13:41:51 2011 UTC (6 years, 11 months ago) by matsuu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bumped. The ebuild is submitted by TANABE Ken-ichi.

(Portage version: 2.1.10.41/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-dns/unbound/unbound-1.4.12-r1.ebuild,v 1.1 2011/09/13 15:14:49 matsuu Exp $
4
5 EAPI="3"
6 PYTHON_DEPEND="python? 2"
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="3.*"
9
10 inherit eutils flag-o-matic python
11
12 DESCRIPTION="A validating, recursive and caching DNS resolver"
13 HOMEPAGE="http://unbound.net/"
14 SRC_URI="http://unbound.net/downloads/${P}.tar.gz"
15
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86 ~x64-macos"
19 IUSE="debug gost python static-libs test threads"
20
21 RDEPEND="dev-libs/expat
22 dev-libs/libevent
23 >=dev-libs/openssl-0.9.8
24 >=net-libs/ldns-1.6.5[ssl,gost?]"
25
26 DEPEND="${RDEPEND}
27 python? ( dev-lang/swig )
28 test? (
29 net-dns/ldns-utils[examples]
30 dev-util/splint
31 app-text/wdiff
32 )"
33
34 # bug #347415
35 RDEPEND="${RDEPEND}
36 net-dns/dnssec-root"
37
38 pkg_setup() {
39 enewgroup unbound
40 enewuser unbound -1 -1 /etc/unbound unbound
41
42 use python && python_pkg_setup
43 }
44
45 src_prepare() {
46 # To avoid below error messages, set 'trust-anchor-file' to same value in
47 # 'auto-trust-anchor-file'.
48 # [23109:0] error: Could not open autotrust file for writing, # /etc/dnssec/root-anchors.txt: Permission denied
49 epatch "${FILESDIR}/${P}-gentoo.patch"
50 }
51
52 src_configure() {
53 append-ldflags -Wl,-z,noexecstack || die
54 econf \
55 --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
56 --with-ldns="${EPREFIX}"/usr \
57 --with-libevent="${EPREFIX}"/usr \
58 --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
59 $(use_enable debug) \
60 $(use_enable gost) \
61 $(use_enable static-libs static) \
62 $(use_with threads pthreads) \
63 $(use_with python pyunbound) \
64 $(use_with python pythonmodule) \
65 --disable-rpath || die
66
67 # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
68 # $(use_enable debug lock-checks) \
69 # $(use_enable debug alloc-checks) \
70 # $(use_enable debug alloc-lite) \
71 # $(use_enable debug alloc-nonregional) \
72 }
73
74 src_install() {
75 emake DESTDIR="${D}" install || die "emake install failed"
76
77 # bug #299016
78 if use python ; then
79 find "${ED}" -name '_unbound.{la,a}' -delete || die
80 fi
81 if ! use static-libs ; then
82 find "${ED}" -name "*.la" -type f -delete || die
83 fi
84
85 newinitd "${FILESDIR}/unbound.initd" unbound || die "newinitd failed"
86 newconfd "${FILESDIR}/unbound.confd" unbound || die "newconfd failed"
87
88 dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES} || die "dodoc failed"
89
90 # bug #315519
91 #exeinto /usr/libexec/munin/plugins
92 #doexe contrib/unbound_munin_ || die "doexe failed"
93 dodoc contrib/unbound_munin_ || die "dodoc failed"
94
95 docinto selinux
96 dodoc contrib/selinux/* || die "dodoc failed"
97
98 exeinto /usr/share/${PN}
99 doexe contrib/update-anchor.sh || die "doexe failed"
100 }
101
102 pkg_postinst() {
103 use python && python_mod_optimize unbound.py unboundmodule.py
104 }
105
106 pkg_postrm() {
107 use python && python_mod_cleanup unbound.py unboundmodule.py
108 }

  ViewVC Help
Powered by ViewVC 1.1.20