summaryrefslogtreecommitdiffstats
path: root/abs/core/ca-certificates/PKGBUILD
blob: 3c293a7d20a2cacb53f331ea5d6ad722a972532e (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
# $Id$
# Maintainer: Pierre Schmitz <pierre@archlinux.de>

pkgname=ca-certificates
pkgver=20140325
pkgrel=1
pkgdesc='Common CA certificates'
arch=('any')
url='http://packages.qa.debian.org/c/ca-certificates.html'
license=('MPL' 'GPL')
source=("http://ftp.debian.org/debian/pool/main/c/${pkgname}/${pkgname}_${pkgver}.tar.xz")
depends=('bash' 'run-parts' 'openssl' 'findutils' 'coreutils' 'sed')
makedepends=('python2')
install='ca-certificates.install'
backup=('etc/ca-certificates.conf')
sha256sums=('c0e3d8c517995db2737f7f1a9b69d654b8823fa6d337871c6ce111fcf083454a')

prepare() {
	cd ${srcdir}/${pkgname}
	sed 's|/usr/bin/python|/usr/bin/python2|g' -i mozilla/certdata2pem.py
	sed 's|python|python2|g' -i mozilla/Makefile
}

build() {
	cd ${srcdir}/${pkgname}
	make SUBDIRS=mozilla
}

package() {
	cd ${srcdir}/${pkgname}
	install -d -m755 ${pkgdir}/{etc/ca-certificates/update.d,usr/{sbin,share/ca-certificates},etc/ssl/certs}
	make install SUBDIRS=mozilla DESTDIR=${pkgdir}
	mv ${pkgdir}/usr/sbin ${pkgdir}/usr/bin
	install -D -m644 sbin/update-ca-certificates.8 ${pkgdir}/usr/share/man/man8/update-ca-certificates.8

	(
	echo "# Automatically generated by ${pkgname}-${pkgver}-${pkgrel}"
	echo "# see update-ca-certificates man page"
	echo "# "
	cd ${pkgdir}/usr/share/ca-certificates
	find . -name '*.crt' | sort | cut -b3-
	) > ${pkgdir}/etc/ca-certificates.conf
}