aboutsummaryrefslogtreecommitdiffstats
path: root/main/ca-certificates/APKBUILD
blob: 98685a597984e9c6c98c26ce8883a36e39710bb4 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ca-certificates
pkgver=20140325

_date=${pkgver%_p*}
_nmu="+nmu${pkgver#*_p}"
[ "$_nmu" = "+nmu${pkgver}" ] && _nmu=""
_ver=${_date}${_nmu}

pkgrel=1
pkgdesc="Common CA certificates PEM files"
url="http://packages.debian.org/sid/ca-certificates"
arch="noarch"
license="MPL 2.0 GPL2+"
depends="run-parts openssl lua5.2 lua5.2-posix"
makedepends="python"
subpackages="$pkgname-doc"
triggers="ca-certificates.trigger=/usr/share/ca-certificates:/etc/ssl/certs"
source="http://ftp.no.debian.org/debian/pool/main/c/$pkgname/${pkgname}_${_ver}.tar.xz
	update-ca-certificates
	"

_builddir="$srcdir"/$pkgname
build () {
	cd "$_builddir"
	make || return 1
}

package() {
	cd "$_builddir"
	install -d -m755 "$pkgdir"/etc/ca-certificates/update.d \
		"$pkgdir"/usr/sbin \
		"$pkgdir"/usr/share/ca-certificates \
		"$pkgdir"/etc/ssl/certs \
		|| return 1
	make DESTDIR="$pkgdir" install || return 1
	install -D -m644 sbin/update-ca-certificates.8 \
		"$pkgdir"/usr/share/man/man8/update-ca-certificates.8 \
		|| return 1

	(
	echo "# Automatically generated by ${pkgname}-${pkgver}-${pkgrel}"
	echo "# $(date -u)"
	echo "# Do not edit."
	cd "$pkgdir"/usr/share/ca-certificates
	find . -name '*.crt' | sort | cut -b3-
	) > "$pkgdir"/etc/ca-certificates.conf

	# http://bugs.alpinelinux.org/issues/2715
	# http://bugs.alpinelinux.org/issues/2846
	install -m755 "$srcdir"/update-ca-certificates "$pkgdir"/usr/sbin \
		|| return 1

	mkdir -p "$pkgdir"/etc/apk/protected_paths.d
	cat <<EOF > "$pkgdir"/etc/apk/protected_paths.d/ca-certificates.list
-etc/ssl/certs/ca-certificates.crt
-etc/ssl/certs/ca-cert-*.pem
-etc/ssl/certs/[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].[r0-9]*
EOF
}

md5sums="0436aba482091da310bd762e1deca8b4  ca-certificates_20140325.tar.xz
b582c6dfa38edcc0ad324736282ff497  update-ca-certificates"
sha256sums="c0e3d8c517995db2737f7f1a9b69d654b8823fa6d337871c6ce111fcf083454a  ca-certificates_20140325.tar.xz
2ea92ac6b35446ddbcd6381a1a2932178e3819125052456a25b0bbc4c36870f0  update-ca-certificates"
sha512sums="6645740d61da78845facce6e3881c64f51e945a454cb26cead6e7df4887f1f3797bea217cebaffaae22a76fa3867ee20dee7b1d5200df20b85878a0c6029c2f8  ca-certificates_20140325.tar.xz
9c4c25ce8a667089ad73c3e494fea1a997bd1a2415c4865dd1a761e103ded44f9b4cd412b9027b28d70b6bf896e7e9ec6f2010c3e059e46b3ddf34f23b5e0815  update-ca-certificates"