mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-09 19:17:55 +08:00
41 lines
1.4 KiB
Bash
41 lines
1.4 KiB
Bash
#
|
|
# Maintainer: Weng Xuetian <wengxt@gmail.com>
|
|
|
|
|
|
pkgname=dnssec-anchors
|
|
pkgver=20150403
|
|
pkgrel=1
|
|
pkgdesc='DNSSEC trust anchors for the root zone'
|
|
url='http://data.iana.org/root-anchors/'
|
|
license=('custom:NoCopyright')
|
|
arch=('any')
|
|
makedepends=('ldns')
|
|
validpgpkeys=('2FBB91BCAAEE0ABE1F8031C7D1AFBCE00F6C91D2')
|
|
source=('http://data.iana.org/root-anchors/root-anchors.xml'
|
|
'root-anchors.xml.asc::http://data.iana.org/root-anchors/root-anchors.asc'
|
|
'LICENSE')
|
|
sha256sums=('dfb281b771dc854c18d1cff9d2eecaf184cf7a9668606aaa33e8f01bf4b4d8e4'
|
|
'SKIP'
|
|
'dd37e92942d5a4024f1c77df49d61ca77fc6284691814903a741785df61f78cb')
|
|
|
|
build() {
|
|
cd "${srcdir}"
|
|
drill -z -s DNSKEY . > root.key
|
|
|
|
cat root-anchors.xml |
|
|
awk 'BEGIN{ORS=" "}(NR>4){gsub(/<[^>]*>/,"");print tolower($0)}' |
|
|
sed 's/ /\n/' > root.ds
|
|
|
|
# Any of those tests failing is suspicious; check thoroughly!
|
|
[[ "$(<root.ds)" = '19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5' ]] &&
|
|
grep -Pq 'IN\tDS\t'"$(<root.ds)" root.key ||
|
|
return 1
|
|
|
|
sed '/DNSKEY/s/ ;{id = '"$(cut -d\ -f1<root.ds)"' .*//;t;d' root.key > trusted-key.key
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}"
|
|
install -Dm644 trusted-key.key "${pkgdir}"/etc/trusted-key.key
|
|
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
} |