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

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

pkgrel=0
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"
options="!fhs"
triggers="ca-certificates.trigger=/usr/share/ca-certificates:/usr/local/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-$_ver
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"/usr/local/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="f619282081c8bfc65ea64c37fa5285ed  ca-certificates_20141019.tar.xz
5af8def40602960071115709b05edeb6  update-ca-certificates"
sha256sums="684902d3f4e9ad27829f4af0d9d2d588afed03667997579b9c2be86fcd1eb73a  ca-certificates_20141019.tar.xz
f27d2cb35ec172f9678a3c98f3f778aac375eb36d47378cdec97608d47672cf4  update-ca-certificates"
sha512sums="5b0e8fb917f5642a5a2b4fde46a706db0c652ff3fb31a5053d9123a5b670b50c6e3cf2496915cc01c613dcbe964d6432f393c12d8a697baedfad58f9d13e568b  ca-certificates_20141019.tar.xz
b793f3f7dc41b5088d6febadc6a5e46368b0b9f8f82cedd13b3b0cd31696294cb14ac0afcd952fc49167afa3dbd69010cecf6de6e0b886d765300405b6934516  update-ca-certificates"