diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-10-24 16:25:11 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-10-24 16:25:57 +0200 |
commit | 03042f9b2b3301ffff604d075c0a4f07deeae175 (patch) | |
tree | 21aaaeb57f41a3ffef77cebb8550dadf51989117 /main/ca-certificates | |
parent | bb1453ff2d40f895fc94271cb840e5e02a294668 (diff) | |
download | aports-03042f9b2b3301ffff604d075c0a4f07deeae175.tar.bz2 aports-03042f9b2b3301ffff604d075c0a4f07deeae175.tar.xz |
main/ca-certificates: improve abuild, replace python with python2
Diffstat (limited to 'main/ca-certificates')
-rw-r--r-- | main/ca-certificates/APKBUILD | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/main/ca-certificates/APKBUILD b/main/ca-certificates/APKBUILD index 731729f4c4..857e1cdd46 100644 --- a/main/ca-certificates/APKBUILD +++ b/main/ca-certificates/APKBUILD @@ -8,7 +8,7 @@ url="http://packages.debian.org/sid/ca-certificates" arch="all" license="MPL 2.0 GPL2+" depends="libressl" # for `openssl certhash` -makedepends="python" +makedepends="python2" subpackages="$pkgname-doc" options="!fhs" triggers="ca-certificates.trigger=/usr/share/ca-certificates:/usr/local/share/ca-certificates:/etc/ssl/certs:/etc/ca-certificates/update.d" @@ -17,19 +17,10 @@ source="http://ftp.no.debian.org/debian/pool/main/c/$pkgname/${pkgname}_${pkgver fix-manpage.patch update-ca.c " - -_builddir="$srcdir"/$pkgname -prepare() { - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir/$pkgname" build () { - cd "$_builddir" + cd "$builddir" make || return 1 ${CC:-gcc} ${CFLAGS} -o update-ca-certificates "$srcdir"/update-ca.c \ @@ -37,7 +28,8 @@ build () { } package() { - cd "$_builddir" + cd "$builddir" + install -d -m755 "$pkgdir"/etc/ca-certificates/update.d \ "$pkgdir"/usr/sbin \ "$pkgdir"/usr/share/ca-certificates \ @@ -51,11 +43,11 @@ package() { || 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- + 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 @@ -64,16 +56,16 @@ package() { || 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 + cat > "$pkgdir"/etc/apk/protected_paths.d/ca-certificates.list <<-EOF + -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 - cat > "$pkgdir"/etc/ca-certificates/update.d/certhash <<EOF -#!/bin/sh -exec /usr/bin/openssl certhash /etc/ssl/certs -EOF + cat > "$pkgdir"/etc/ca-certificates/update.d/certhash <<-EOF + #!/bin/sh + exec /usr/bin/openssl certhash /etc/ssl/certs + EOF chmod +x "$pkgdir"/etc/ca-certificates/update.d/certhash || return 1 } |