1 |
commit: 70d311026cfc6e9fb80c19ffc063c712ed091f29 |
2 |
Author: Austin English <wizardedit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 28 22:42:00 2016 +0000 |
4 |
Commit: Austin English <wizardedit <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 28 22:42:00 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70d31102 |
7 |
|
8 |
net-dns/maradns: use #!/sbin/openrc-run instead of #!/sbin/runscript |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/573846 |
11 |
|
12 |
Package-Manager: portage-2.2.26 |
13 |
|
14 |
net-dns/maradns/files/deadwood | 4 +- |
15 |
net-dns/maradns/files/maradns2 | 4 +- |
16 |
net-dns/maradns/files/zoneserver2 | 4 +- |
17 |
net-dns/maradns/maradns-2.0.09-r1.ebuild | 98 ++++++++++++++++++++++++++++++++ |
18 |
4 files changed, 104 insertions(+), 6 deletions(-) |
19 |
|
20 |
diff --git a/net-dns/maradns/files/deadwood b/net-dns/maradns/files/deadwood |
21 |
index d9e8175..69fe0a4 100644 |
22 |
--- a/net-dns/maradns/files/deadwood |
23 |
+++ b/net-dns/maradns/files/deadwood |
24 |
@@ -1,5 +1,5 @@ |
25 |
-#!/sbin/runscript |
26 |
-# Copyright 1999-2012 Gentoo Foundation |
27 |
+#!/sbin/openrc-run |
28 |
+# Copyright 1999-2016 Gentoo Foundation |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
# $Id$ |
31 |
|
32 |
|
33 |
diff --git a/net-dns/maradns/files/maradns2 b/net-dns/maradns/files/maradns2 |
34 |
index cc6915f..a6fb9e4 100644 |
35 |
--- a/net-dns/maradns/files/maradns2 |
36 |
+++ b/net-dns/maradns/files/maradns2 |
37 |
@@ -1,5 +1,5 @@ |
38 |
-#!/sbin/runscript |
39 |
-# Copyright 1999-2012 Gentoo Foundation |
40 |
+#!/sbin/openrc-run |
41 |
+# Copyright 1999-2016 Gentoo Foundation |
42 |
# Distributed under the terms of the GNU General Public License v2 |
43 |
# $Id$ |
44 |
|
45 |
|
46 |
diff --git a/net-dns/maradns/files/zoneserver2 b/net-dns/maradns/files/zoneserver2 |
47 |
index 6c6486d..b2abe26 100644 |
48 |
--- a/net-dns/maradns/files/zoneserver2 |
49 |
+++ b/net-dns/maradns/files/zoneserver2 |
50 |
@@ -1,5 +1,5 @@ |
51 |
-#!/sbin/runscript |
52 |
-# Copyright 1999-2012 Gentoo Foundation |
53 |
+#!/sbin/openrc-run |
54 |
+# Copyright 1999-2016 Gentoo Foundation |
55 |
# Distributed under the terms of the GNU General Public License v2 |
56 |
# $Id$ |
57 |
|
58 |
|
59 |
diff --git a/net-dns/maradns/maradns-2.0.09-r1.ebuild b/net-dns/maradns/maradns-2.0.09-r1.ebuild |
60 |
new file mode 100644 |
61 |
index 0000000..42c2d00 |
62 |
--- /dev/null |
63 |
+++ b/net-dns/maradns/maradns-2.0.09-r1.ebuild |
64 |
@@ -0,0 +1,98 @@ |
65 |
+# Copyright 1999-2016 Gentoo Foundation |
66 |
+# Distributed under the terms of the GNU General Public License v2 |
67 |
+# $Id$ |
68 |
+ |
69 |
+EAPI="5" |
70 |
+ |
71 |
+inherit eutils systemd toolchain-funcs user |
72 |
+ |
73 |
+DEADWOOD_VER="3.2.05" |
74 |
+ |
75 |
+DESCRIPTION="A security-aware DNS server" |
76 |
+HOMEPAGE="http://www.maradns.org/" |
77 |
+SRC_URI="http://www.maradns.org/download/${PV%.*}/${PV}/${P}.tar.bz2" |
78 |
+ |
79 |
+LICENSE="BSD-2" |
80 |
+SLOT="0" |
81 |
+KEYWORDS="amd64 ~mips ppc x86" |
82 |
+IUSE="authonly ipv6" |
83 |
+ |
84 |
+DEPEND="" |
85 |
+RDEPEND="" |
86 |
+ |
87 |
+pkg_setup() { |
88 |
+ ebegin "Creating group and users" |
89 |
+ enewgroup maradns 99 |
90 |
+ enewuser duende 66 -1 -1 maradns |
91 |
+ enewuser maradns 99 -1 -1 maradns |
92 |
+ eend ${?} |
93 |
+} |
94 |
+ |
95 |
+src_prepare() { |
96 |
+ # Apply some minor patches from Debian. Last one - from Gentoo |
97 |
+ epatch "${FILESDIR}/${PN}-2.0.06-askmara-tcp.patch" \ |
98 |
+ "${FILESDIR}/${PN}-2.0.06-duende-man.patch" \ |
99 |
+ "${FILESDIR}/${P}-build.patch" |
100 |
+ epatch_user |
101 |
+} |
102 |
+ |
103 |
+src_configure() { |
104 |
+ # Use duende-ng.c. |
105 |
+ cp "${S}/tools/duende-ng.c" "${S}/tools/duende.c" || die |
106 |
+ |
107 |
+ tc-export CC |
108 |
+ ./configure $(use ipv6 && echo "--ipv6") || die "Failed to configure ${PN}" |
109 |
+} |
110 |
+ |
111 |
+src_install() { |
112 |
+ # Install the MaraDNS binaries. |
113 |
+ dosbin server/maradns |
114 |
+ dosbin tcp/zoneserver |
115 |
+ dobin tcp/getzone tcp/fetchzone |
116 |
+ dobin tools/askmara tools/askmara-tcp tools/duende |
117 |
+ dobin tools/bind2csv2.py tools/csv1tocsv2.pl |
118 |
+ |
119 |
+ # MaraDNS docs, manpages, misc. |
120 |
+ dodoc doc/en/{QuickStart,README,*.txt} |
121 |
+ dodoc doc/en/text/*.txt |
122 |
+ doman doc/en/man/*.[1-9] |
123 |
+ dodoc maradns.gpg.key |
124 |
+ dohtml doc/en/*.html |
125 |
+ dohtml -r doc/en/webpage |
126 |
+ dohtml -r doc/en/tutorial |
127 |
+ docinto examples |
128 |
+ dodoc doc/en/examples/example_* |
129 |
+ |
130 |
+ # Deadwood binary, docs, manpages, etc. |
131 |
+ if ! use authonly; then |
132 |
+ dosbin deadwood-${DEADWOOD_VER}/src/Deadwood |
133 |
+ doman deadwood-${DEADWOOD_VER}/doc/{Deadwood,Duende}.1 |
134 |
+ docinto deadwood |
135 |
+ dodoc deadwood-${DEADWOOD_VER}/doc/{Deadwood,Duende,FAQ}.txt |
136 |
+ dohtml deadwood-${DEADWOOD_VER}/doc/{Deadwood,FAQ}.html |
137 |
+ docinto deadwood/internals |
138 |
+ dodoc deadwood-${DEADWOOD_VER}/doc/internals/* |
139 |
+ insinto /etc/maradns |
140 |
+ newins deadwood-${DEADWOOD_VER}/doc/dwood3rc-all dwood3rc_all.dist |
141 |
+ fi |
142 |
+ |
143 |
+ # Example configurations. |
144 |
+ insinto /etc/maradns |
145 |
+ newins doc/en/examples/example_full_mararc mararc_full.dist |
146 |
+ newins doc/en/examples/example_csv2 example_csv2.dist |
147 |
+ keepdir /etc/maradns/logger |
148 |
+ |
149 |
+ # Init scripts. |
150 |
+ newinitd "${FILESDIR}"/maradns2 maradns |
151 |
+ newinitd "${FILESDIR}"/zoneserver2 zoneserver |
152 |
+ if ! use authonly; then |
153 |
+ newinitd "${FILESDIR}"/deadwood deadwood |
154 |
+ fi |
155 |
+ |
156 |
+ # systemd unit |
157 |
+ # please keep paths in sync! |
158 |
+ sed -e "s^@bindir@^${EPREFIX}/usr/sbin^" \ |
159 |
+ -e "s^@sysconfdir@^${EPREFIX}/etc/maradns^" \ |
160 |
+ "${FILESDIR}"/maradns.service.in > "${T}"/maradns.service |
161 |
+ systemd_dounit "${T}"/maradns.service |
162 |
+} |