[arch-commits] Commit in ca-certificates/repos (3 files)

Pierre Schmitz pierre at archlinux.org
Mon Feb 13 16:03:16 EST 2012


    Date: Monday, February 13, 2012 @ 16:03:16
  Author: pierre
Revision: 150162

archrelease: copy trunk to testing-any

Added:
  ca-certificates/repos/testing-any/
  ca-certificates/repos/testing-any/PKGBUILD
    (from rev 150161, ca-certificates/trunk/PKGBUILD)
  ca-certificates/repos/testing-any/ca-certificates.install
    (from rev 150161, ca-certificates/trunk/ca-certificates.install)

-------------------------+
 PKGBUILD                |   38 ++++++++++++++++++++++++++++++++++++++
 ca-certificates.install |   26 ++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)

Copied: ca-certificates/repos/testing-any/PKGBUILD (from rev 150161, ca-certificates/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD	                        (rev 0)
+++ testing-any/PKGBUILD	2012-02-13 21:03:16 UTC (rev 150162)
@@ -0,0 +1,38 @@
+# $Id$
+# Maintainer: Pierre Schmitz <pierre at archlinux.de>
+
+pkgname=ca-certificates
+pkgver=20120212
+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.gz")
+depends=('bash' 'run-parts' 'openssl' 'findutils' 'coreutils' 'sed')
+makedepends=('python2')
+install='ca-certificates.install'
+backup=('etc/ca-certificates.conf')
+sha256sums=('95f3eac93dad4433b5731bc9e106a26e2ccf210acace1927e597477b24187dce')
+
+build() {
+	cd ${srcdir}/${pkgname}-${pkgver}
+	sed 's|/usr/bin/python|/usr/bin/python2|g' -i mozilla/certdata2pem.py
+	sed 's|python|python2|g' -i mozilla/Makefile
+	make
+}
+
+package() {
+	cd ${srcdir}/${pkgname}-${pkgver}
+	install -d -m755 ${pkgdir}/{etc/ca-certificates/update.d,usr/{sbin,share/ca-certificates},etc/ssl/certs}
+	make install DESTDIR=${pkgdir}
+	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
+}

Copied: ca-certificates/repos/testing-any/ca-certificates.install (from rev 150161, ca-certificates/trunk/ca-certificates.install)
===================================================================
--- testing-any/ca-certificates.install	                        (rev 0)
+++ testing-any/ca-certificates.install	2012-02-13 21:03:16 UTC (rev 150162)
@@ -0,0 +1,26 @@
+export LC_ALL=C
+
+post_install() {
+	usr/sbin/update-ca-certificates --fresh >/dev/null 2>&1
+}
+
+post_upgrade() {
+	if [ $(vercmp $2 20110421-1) -lt 0 ]; then
+		echo 'Updating certificates. This might take a while...'
+	fi
+	usr/sbin/update-ca-certificates --fresh >/dev/null 2>&1
+}
+
+pre_remove() {
+	# clean up certificates
+	local _backup=$(mktemp)
+	mv etc/ca-certificates.conf ${_backup}
+	echo > etc/ca-certificates.conf
+	usr/sbin/update-ca-certificates --fresh >/dev/null 2>&1
+	mv ${_backup} etc/ca-certificates.conf
+}
+
+post_remove() {
+	# remove the cert file if it is empty
+	[[ -s etc/ssl/certs/ca-certificates.crt ]] || rm -f etc/ssl/certs/ca-certificates.crt
+}



More information about the arch-commits mailing list