Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/knot/
Date: Fri, 17 Nov 2017 18:47:08
Message-Id: 1510944107.4803ed1237ca22cda7fcb55b7d517d6cf3e5df02.soap@gentoo
1 commit: 4803ed1237ca22cda7fcb55b7d517d6cf3e5df02
2 Author: Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re>
3 AuthorDate: Tue Nov 14 19:47:24 2017 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 17 18:41:47 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4803ed12
7
8 net-dns/knot: fix systemd service's filename
9
10 Closes: https://bugs.gentoo.org/637504
11 Package-Manager: Portage-2.3.8, Repoman-2.3.3
12
13 net-dns/knot/knot-2.6.1-r1.ebuild | 102 ++++++++++++++++++++++++++++++++++++++
14 1 file changed, 102 insertions(+)
15
16 diff --git a/net-dns/knot/knot-2.6.1-r1.ebuild b/net-dns/knot/knot-2.6.1-r1.ebuild
17 new file mode 100644
18 index 00000000000..90e03e2d704
19 --- /dev/null
20 +++ b/net-dns/knot/knot-2.6.1-r1.ebuild
21 @@ -0,0 +1,102 @@
22 +# Copyright 1999-2017 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +inherit systemd user
28 +
29 +DESCRIPTION="High-performance authoritative-only DNS server"
30 +HOMEPAGE="https://www.knot-dns.cz/"
31 +SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz"
32 +
33 +LICENSE="GPL-3"
34 +SLOT="0"
35 +KEYWORDS="~amd64 ~x86"
36 +
37 +KNOT_MODULES=(
38 + "+dnsproxy"
39 + "dnstap"
40 + "+noudp"
41 + "+onlinesign"
42 + "rosedb"
43 + "+rrl"
44 + "+stats"
45 + "+synthrecord"
46 + "+whoami"
47 +)
48 +IUSE="doc caps +fastparser idn libidn2 systemd +utils ${KNOT_MODULES[@]}"
49 +
50 +RDEPEND="
51 + >=dev-db/lmdb-0.9.15
52 + dev-libs/libedit
53 + >=dev-libs/userspace-rcu-0.5.4
54 + dev-python/lmdb
55 + >=net-libs/gnutls-3.3:=
56 + caps? ( >=sys-libs/libcap-ng-0.6.4 )
57 + dnstap? (
58 + dev-libs/fstrm
59 + dev-libs/protobuf-c
60 + )
61 + idn? (
62 + !libidn2? ( net-dns/libidn )
63 + libidn2? ( >=net-dns/libidn2-2.0.0 )
64 + )
65 + systemd? ( >=sys-apps/systemd-229 )
66 +"
67 +DEPEND="${RDEPEND}
68 + virtual/pkgconfig
69 + doc? ( dev-python/sphinx )
70 +"
71 +
72 +S="${WORKDIR}/${P/_/-}"
73 +
74 +src_configure() {
75 + local u
76 + local my_conf=()
77 + for u in "${KNOT_MODULES[@]#+}"; do
78 + my_conf+=("$(use_with $u module-$u)")
79 + done
80 +
81 + econf \
82 + --with-storage="${EPREFIX}/var/lib/${PN}" \
83 + --with-rundir="${EPREFIX}/var/run/${PN}" \
84 + $(use_enable fastparser) \
85 + $(use_enable dnstap) \
86 + $(use_enable doc documentation) \
87 + $(use_enable utils utilities) \
88 + --enable-systemd=$(usex systemd) \
89 + $(use_with idn libidn) \
90 + "${my_conf[@]}"
91 +}
92 +
93 +src_compile() {
94 + default
95 +
96 + if use doc; then
97 + emake -C doc html
98 + HTML_DOCS=( doc/_build/html/{*.html,*.js,_sources,_static} )
99 + fi
100 +}
101 +
102 +src_test() {
103 + emake check
104 +}
105 +
106 +src_install() {
107 + default
108 +
109 + rmdir "${D}var/run/${PN}" "${D}var/run/" || die
110 + keepdir /var/lib/${PN}
111 +
112 + newinitd "${FILESDIR}/knot.init" knot
113 + if use systemd; then
114 + systemd_newunit "${FILESDIR}/knot-1.service" knot.service
115 + fi
116 +
117 + find "${D}" -name '*.la' -delete || die
118 +}
119 +
120 +pkg_postinst() {
121 + enewgroup knot 53
122 + enewuser knot 53 -1 /var/lib/knot knot
123 +}