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

Contents of /net-dns/unbound/unbound-1.4.16.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sat Sep 27 00:15:37 2014 UTC (3 years, 9 months ago) by radhermit
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Remove old.

(Portage version: 2.2.13/cvs/Linux x86_64, signed Manifest commit with key 4F064CA3)

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

  ViewVC Help
Powered by ViewVC 1.1.20