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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Dec 8 18:39:07 2014 UTC (3 years, 1 month ago) by radhermit
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump (bug #532000).

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

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.5.1_rc2.ebuild,v 1.1 2014/12/04 01:25:56 radhermit 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="~amd64 ~hppa ~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
67 # required for the python part
68 multilib_copy_sources
69 }
70
71 src_configure() {
72 [[ ${CHOST} == *-darwin* ]] || append-ldflags -Wl,-z,noexecstack
73 multilib-minimal_src_configure
74 }
75
76 multilib_src_configure() {
77 econf \
78 $(use_enable debug) \
79 $(use_enable gost) \
80 $(use_enable dnstap) \
81 $(use_enable ecdsa) \
82 $(use_enable static-libs static) \
83 $(multilib_native_use_with python pythonmodule) \
84 $(multilib_native_use_with python pyunbound) \
85 $(use_with threads pthreads) \
86 --disable-rpath \
87 --with-libevent="${EPREFIX}"/usr \
88 --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
89 --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
90 --with-ssl="${EPREFIX}"/usr \
91 --with-libexpat="${EPREFIX}"/usr
92
93 # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
94 # $(use_enable debug lock-checks) \
95 # $(use_enable debug alloc-checks) \
96 # $(use_enable debug alloc-lite) \
97 # $(use_enable debug alloc-nonregional) \
98 }
99
100 multilib_src_install_all() {
101 prune_libtool_files --modules
102 use python && python_optimize
103
104 newinitd "${FILESDIR}"/unbound.initd unbound
105 newconfd "${FILESDIR}"/unbound.confd unbound
106
107 systemd_dounit "${FILESDIR}"/unbound.service
108 systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service"
109 systemd_dounit "${FILESDIR}"/unbound-anchor.service
110
111 dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES}
112
113 # bug #315519
114 dodoc contrib/unbound_munin_
115
116 docinto selinux
117 dodoc contrib/selinux/*
118
119 exeinto /usr/share/${PN}
120 doexe contrib/update-anchor.sh
121 }

  ViewVC Help
Powered by ViewVC 1.1.20