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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sat Sep 27 00:13:03 2014 UTC (3 years, 6 months ago) by radhermit
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Remove ldns dep since it's bundled and locally modified now.

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

1 # Copyright 1999-2014 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.22.ebuild,v 1.5 2014/08/21 14:23:59 armin76 Exp $
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_6,2_7} )
7
8 inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user
9
10 DESCRIPTION="A validating, recursive and caching DNS resolver"
11 HOMEPAGE="http://unbound.net/"
12 SRC_URI="http://unbound.net/downloads/${P}.tar.gz"
13
14 LICENSE="BSD GPL-2"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-macos"
17 IUSE="debug gost python selinux static-libs test threads"
18 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
19
20 # Note: expat is needed by executable only but the Makefile is custom
21 # and doesn't make it possible to easily install the library without
22 # the executables. MULTILIB_USEDEP may be dropped once build system
23 # is fixed.
24
25 RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
26 >=dev-libs/libevent-2.0.21[${MULTILIB_USEDEP}]
27 >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}]
28 >=net-libs/ldns-1.6.16-r1[ecdsa,ssl,gost?,${MULTILIB_USEDEP}]
29 python? ( ${PYTHON_DEPS} )
30 selinux? ( sec-policy/selinux-bind )"
31
32 DEPEND="${RDEPEND}
33 python? ( dev-lang/swig )
34 test? (
35 net-dns/ldns-utils[examples]
36 dev-util/splint
37 app-text/wdiff
38 )"
39
40 # bug #347415
41 RDEPEND="${RDEPEND}
42 net-dns/dnssec-root"
43
44 pkg_setup() {
45 enewgroup unbound
46 enewuser unbound -1 -1 /etc/unbound unbound
47
48 use python && python-single-r1_pkg_setup
49 }
50
51 src_prepare() {
52 # To avoid below error messages, set 'trust-anchor-file' to same value in
53 # 'auto-trust-anchor-file'.
54 # [23109:0] error: Could not open autotrust file for writing,
55 # /etc/dnssec/root-anchors.txt: Permission denied
56 epatch "${FILESDIR}"/${PN}-1.4.12-gentoo.patch
57
58 # required for the python part
59 multilib_copy_sources
60 }
61
62 src_configure() {
63 [[ ${CHOST} == *-darwin* ]] || append-ldflags -Wl,-z,noexecstack
64 multilib-minimal_src_configure
65 }
66
67 multilib_src_configure() {
68 econf \
69 $(use_enable debug) \
70 $(use_enable gost) \
71 $(use_enable static-libs static) \
72 $(multilib_native_use_with python pythonmodule) \
73 $(multilib_native_use_with python pyunbound) \
74 $(use_with threads pthreads) \
75 --disable-rpath \
76 --enable-ecdsa \
77 --with-ldns="${EPREFIX}"/usr \
78 --with-libevent="${EPREFIX}"/usr \
79 --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
80 --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
81 --with-ssl="${EPREFIX}"/usr \
82 --with-libexpat="${EPREFIX}"/usr
83
84 # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
85 # $(use_enable debug lock-checks) \
86 # $(use_enable debug alloc-checks) \
87 # $(use_enable debug alloc-lite) \
88 # $(use_enable debug alloc-nonregional) \
89 }
90
91 multilib_src_install_all() {
92 prune_libtool_files --modules
93 use python && python_optimize
94
95 newinitd "${FILESDIR}"/unbound.initd unbound
96 newconfd "${FILESDIR}"/unbound.confd unbound
97
98 systemd_dounit "${FILESDIR}"/unbound.service
99 systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service"
100 systemd_dounit "${FILESDIR}"/unbound-anchor.service
101
102 dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES}
103
104 # bug #315519
105 dodoc contrib/unbound_munin_
106
107 docinto selinux
108 dodoc contrib/selinux/*
109
110 exeinto /usr/share/${PN}
111 doexe contrib/update-anchor.sh
112 }

  ViewVC Help
Powered by ViewVC 1.1.20