summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2016-08-03 17:35:02 -0400
committerMichael Orlitzky <mjo@gentoo.org>2016-08-03 17:35:02 -0400
commit213bd560303a32e1d9d72c86e5694757ab032b20 (patch)
tree6b3b772388d91e741f6236a6cf3521a8f359ea22 /net-dns/maradns
parentapp-backup/boxbackup: new revision to fix three QA issues. (diff)
downloadgentoo-213bd560303a32e1d9d72c86e5694757ab032b20.tar.gz
gentoo-213bd560303a32e1d9d72c86e5694757ab032b20.tar.bz2
gentoo-213bd560303a32e1d9d72c86e5694757ab032b20.zip
net-dns/maradns: new revision to fix minor QA issues.
The main reason for a new revision is to add "GPL-2" to the LICENSE per bug 426018. But with a revision, it made sense to update to EAPI=6, and perform the resulting cleanup in the ebuild. The src_prepare function was eliminated, and some dohtml calls were changed to dodoc. A missing die() was added, and the examples were moved behind USE=examples. Gentoo-Bug: 426018 Package-Manager: portage-2.2.28
Diffstat (limited to 'net-dns/maradns')
-rw-r--r--net-dns/maradns/maradns-2.0.09-r2.ebuild102
1 files changed, 102 insertions, 0 deletions
diff --git a/net-dns/maradns/maradns-2.0.09-r2.ebuild b/net-dns/maradns/maradns-2.0.09-r2.ebuild
new file mode 100644
index 00000000000..a9e44e763eb
--- /dev/null
+++ b/net-dns/maradns/maradns-2.0.09-r2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit systemd toolchain-funcs user
+
+DEADWOOD_VER="3.2.05"
+
+DESCRIPTION="A security-aware DNS server"
+HOMEPAGE="http://www.maradns.org/"
+SRC_URI="http://www.maradns.org/download/${PV%.*}/${PV}/${P}.tar.bz2"
+
+# The GPL-2 covers the init script, bug 426018.
+LICENSE="BSD-2 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~ppc ~x86"
+IUSE="authonly examples ipv6"
+
+DEPEND=""
+RDEPEND=""
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.06-askmara-tcp.patch"
+ "${FILESDIR}/${PN}-2.0.06-duende-man.patch"
+ "${FILESDIR}/${P}-build.patch"
+)
+
+pkg_setup() {
+ ebegin "Creating group and users"
+ enewgroup maradns 99
+ enewuser duende 66 -1 -1 maradns
+ enewuser maradns 99 -1 -1 maradns
+ eend ${?}
+}
+
+src_configure() {
+ # Use duende-ng.c.
+ cp "${S}/tools/duende-ng.c" "${S}/tools/duende.c" \
+ || die "failed to rename duende-ng.c"
+
+ tc-export CC
+ ./configure $(use ipv6 && echo "--ipv6") || die "Failed to configure ${PN}"
+}
+
+src_install() {
+ # Install the MaraDNS binaries.
+ dosbin server/maradns
+ dosbin tcp/zoneserver
+ dobin tcp/getzone tcp/fetchzone
+ dobin tools/askmara tools/askmara-tcp tools/duende
+ dobin tools/bind2csv2.py tools/csv1tocsv2.pl
+
+ # MaraDNS docs, manpages, misc.
+ dodoc doc/en/{QuickStart,README,*.txt}
+ dodoc doc/en/text/*.txt
+ doman doc/en/man/*.[1-9]
+ dodoc maradns.gpg.key
+ dodoc doc/en/*.html
+ dodoc -r doc/en/webpage
+ dodoc -r doc/en/tutorial
+ if use examples ; then
+ docinto examples
+ dodoc doc/en/examples/example_*
+ fi
+
+ # Deadwood binary, docs, manpages, etc.
+ if ! use authonly; then
+ dosbin deadwood-${DEADWOOD_VER}/src/Deadwood
+ doman deadwood-${DEADWOOD_VER}/doc/{Deadwood,Duende}.1
+ docinto deadwood
+ dodoc deadwood-${DEADWOOD_VER}/doc/{Deadwood,Duende,FAQ}.txt
+ dodoc deadwood-${DEADWOOD_VER}/doc/{Deadwood,FAQ}.html
+ docinto deadwood/internals
+ dodoc deadwood-${DEADWOOD_VER}/doc/internals/*
+ insinto /etc/maradns
+ newins deadwood-${DEADWOOD_VER}/doc/dwood3rc-all dwood3rc_all.dist
+ fi
+
+ # Example configurations.
+ insinto /etc/maradns
+ newins doc/en/examples/example_full_mararc mararc_full.dist
+ newins doc/en/examples/example_csv2 example_csv2.dist
+ keepdir /etc/maradns/logger
+
+ # Init scripts.
+ newinitd "${FILESDIR}"/maradns2 maradns
+ newinitd "${FILESDIR}"/zoneserver2 zoneserver
+ if ! use authonly; then
+ newinitd "${FILESDIR}"/deadwood deadwood
+ fi
+
+ # systemd unit
+ # please keep paths in sync!
+ sed -e "s^@bindir@^${EPREFIX}/usr/sbin^" \
+ -e "s^@sysconfdir@^${EPREFIX}/etc/maradns^" \
+ "${FILESDIR}"/maradns.service.in > "${T}"/maradns.service \
+ || die "failed to create the maradns.service file (sed)"
+
+ systemd_dounit "${T}"/maradns.service
+}