summaryrefslogtreecommitdiffstats
path: root/main/dnssec-root/APKBUILD
blob: e9785b1252e5c19a57fa58491ef22474605e4181 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dnssec-root
pkgver=20100715
pkgrel=0
pkgdesc="The DNSSEC root key(s)"
url="https://www.iana.org/dnssec/"
arch="noarch"
license="public-domain"
depends=""
makedepends="libxslt gnupg openssl"
install=""
subpackages=""
source="saveas-http://data.iana.org/root-anchors/root-anchors.xml/root-anchors-$pkgver.xml
	http://data.iana.org/root-anchors/Kjqmt7v.csr

	http://data.iana.org/root-anchors/Kjqmt7v.crt
	http://data.iana.org/root-anchors/root-anchors.p7s
	http://data.iana.org/root-anchors/root-anchors.asc
	http://data.iana.org/root-anchors/icannbundle.pem
	http://data.iana.org/root-anchors/icann.pgp

	anchors2ds.xsl
	"

# http://permalink.gmane.org/gmane.network.dns.unbound.user/1039

_builddir="$srcdir"/build
_dnssecdir="usr/share/dnssec"
prepare() {
	mkdir -p "$_builddir"
	
	(
		export GNUPGHOME="$_builddir"/gpg
		install -d -m 700 "$GNUPGHOME"
		gpg --import "$srcdir"/icann.pgp || exit 1
		gpg --verify "$srcdir"/root-anchors.asc \
			"$srcdir"/root-anchors-$pkgver.xml
	) || return 1

	openssl smime  -verify -content "$srcdir"/root-anchors-$pkgver.xml \
		-in "$srcdir"/root-anchors.p7s -inform der \
		-CAfile "$srcdir"/icannbundle.pem \
		|| return 1
}

build() {
	cd "$_builddir"
	xsltproc -o root-anchors.txt "$srcdir"/anchors2ds.xsl \
		"$srcdir"/root-anchors-$pkgver.xml


}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/$_dnssecdir
	install root-anchors.txt "$srcdir"/Kjqmt7v.csr \
		"$pkgdir"/$_dnssecdir || return 1
	install "$srcdir"/root-anchors-$pkgver.xml \
		"$pkgdir"/$_dnssecdir/root-anchors.xml
}

md5sums="69e6f9b67e92fbc952d488cc6f67198f  root-anchors-20100715.xml
427766bf91c674c4f0469ed363f207a8  Kjqmt7v.csr
27bbd7b1e0b0381adddc33da2bfb3241  Kjqmt7v.crt
4a6eaf38469abd82df5ce3832962ab4f  root-anchors.p7s
a5612e1b84a75c29b642b9342286c511  root-anchors.asc
59774aba58dbde1049bdf4722fb4f02c  icannbundle.pem
041a789ee96301623d3e66e4d52c8a0b  icann.pgp
1043c559c923279600a6da395b794597  anchors2ds.xsl"