# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=5 DESCRIPTION="The DNSSEC root key(s)" HOMEPAGE="https://www.iana.org/dnssec/" SRC_URI="https://data.iana.org/root-anchors/root-anchors.xml -> root-anchors-${PV}.xml https://data.iana.org/root-anchors/root-anchors.p7s -> root-anchors-${PV}.p7s" LICENSE="public-domain" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x64-macos" DEPEND="dev-libs/libxslt dev-libs/openssl" S="${WORKDIR}" src_unpack() { return } src_prepare() { return } src_compile() { # CAfile can be retreived from https://data.iana.org/root-anchors/icannbundle.pem openssl smime -verify \ -content "${DISTDIR}"/root-anchors-${PV}.xml \ -in "${DISTDIR}"/root-anchors-${PV}.p7s -inform der \ -CAfile "${FILESDIR}"/icannbundle-${PV}.pem || die "OpenSSL S/MIME verification failed" echo ">>> OpenSSL S/MIME verification passed" xsltproc \ -o root-anchors-${PV}.txt \ "${FILESDIR}"/anchors2ds.xsl \ "${DISTDIR}"/root-anchors-${PV}.xml \ || die 'xsl translation failed' } src_install() { insinto /etc/dnssec newins "${DISTDIR}"/root-anchors-"${PV}".xml root-anchors.xml newins root-anchors-"${PV}".txt root-anchors.txt }