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

Contents of /net-dns/unbound/unbound-1.5.1-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Wed Jul 29 15:02:42 2015 UTC (2 years, 8 months ago) by klausman
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +2 -2 lines
Keyworded on alpha, bug 531068

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key CE5D54E8)

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

  ViewVC Help
Powered by ViewVC 1.1.20