aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-keys/APKBUILD
blob: 1ca5e93b6fef441290ceb77d6b231e762cd8257c (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-keys
pkgver=2.2
pkgrel=0
pkgdesc="Public keys for Alpine Linux packages"
url="https://alpinelinux.org"
# we install arch specific keys to /etc so we cannot do arch=noarch
arch="all"
license="MIT"
replaces="alpine-base"
options="!check" # No testsuite

_arch_keys="
	aarch64:alpine-devel@lists.alpinelinux.org-58199dcc.rsa.pub
	armhf:alpine-devel@lists.alpinelinux.org-524d27bb.rsa.pub

	x86:alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub
	x86,x86_64:alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub
	x86_64:alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub

	ppc64le:alpine-devel@lists.alpinelinux.org-58cbb476.rsa.pub

	s390x:alpine-devel@lists.alpinelinux.org-58e4f17d.rsa.pub

	mips64:alpine-devel@lists.alpinelinux.org-5e69ca50.rsa.pub
	"

for _i in $_arch_keys; do
	source="$source ${_i#*:}"
done

_ins_key() {
	msg "- $2 ($1)"
	install -Dm644 "$srcdir"/$2 "$pkgdir"/etc/apk/keys/$2
}

_install_x86() {
	case "$1" in
	x86*) _ins_key $1 $2 ;;
	esac
}

_install_arm() {
	case "$1" in
	aarch64|arm*) _ins_key $1 $2 ;;
	esac
}

_install_ppc() {
	case "$1" in
	ppc*) _ins_key $1 $2 ;;
	esac
}

_install_s390x() {
	case "$1" in
	s390x) _ins_key $1 $2 ;;
	esac
}

_install_mips() {
	case "$1" in
	mips64) _ins_key $1 $2 ;;
	esac
}

package() {
	# copy keys for repos
	mkdir -p "$pkgdir"/etc/apk/keys
	for i in $_arch_keys; do
		_archs="${i%:*}"
		_key="${i#*:}"
		install -Dm644 "$srcdir"/$_key \
			"$pkgdir"/usr/share/apk/keys/$_key

		for _arch in ${_archs//,/ }; do
			mkdir -p "$pkgdir"/usr/share/apk/keys/$_arch
			ln -s ../$_key "$pkgdir"/usr/share/apk/keys/$_arch/

			case "$CARCH" in
			x86*) _install_x86 $_arch $_key ;;
			arm*|aarch64) _install_arm $_arch $_key ;;
			ppc*) _install_ppc $_arch $_key ;;
			s390x) _install_s390x $_arch $_key ;;
			mips*) _install_mips $_arch $_key ;;
			esac
		done
	done
}

sha512sums="e4f9e314f8e506fba2cb3e599c6412a036ec37ce3a54990fc7d80a821d8728f40ee3b4aa8a15218d50341fa785d9ddf7c7471f45018c6a2065ab13664a1aa9e9  alpine-devel@lists.alpinelinux.org-58199dcc.rsa.pub
698fda502f70365a852de3c10636eadfc4f70a7a00f096581119aef665e248b787004ceef63f4c8cb18c6f88d18b8b1bd6b3c5d260e79e6d73a3cc09537b196e  alpine-devel@lists.alpinelinux.org-524d27bb.rsa.pub
e18e65ee911eb1f8ea869f758e8f2c94cf2ac254ee7ab90a3de1d47b94a547c2066214abf710da21910ebedc0153d05fd4fe579cc5ce24f46e0cfd29a02b1a68  alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub
2d4064cbe09ff958493ec86bcb925af9b7517825d1d9d8d00f2986201ad5952f986fea83d1e2c177e92130700bafa8c0bff61411b3cdb59a41e460ed719580a6  alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub
721134f289ab1e7dde9158359906017daee40983199fe55f28206c8cdc46b8fcf177a36f270ce374b0eba5dbe01f68cbb3e385ae78a54bb0a2ed1e83a4d820a5  alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub
bb5a3df8fac14a62d5936fb3722873fa6a121219b703cba955eb77de38c4384aeaf378fb9321a655e255f0be761e894e309b3789867279c1524dab6300cd8ef1  alpine-devel@lists.alpinelinux.org-58cbb476.rsa.pub
0666389ca53121453578cd4bef5fd06e159e291164b3e3233e7d6521604f8bebd30caeef1663adcd5309e07278833402c8a92c33294ec0c5cada24dc47c8cc98  alpine-devel@lists.alpinelinux.org-58e4f17d.rsa.pub
66ce9677e9c2a7961d5d7bc5b162ed3114a7aef6d01181073c1f42a9934966eecded2ec09deb210f5a389d434d1641ba35fe3abdd5246b2e97d5a5b26a945c5c  alpine-devel@lists.alpinelinux.org-5e69ca50.rsa.pub"