wok rev 19549

Up cacerts (20161124), perl no more need in post_install
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Dec 09 03:40:48 2016 +0200 (2016-12-09)
parents de5eaf45ff17
children 71100cb9396a
files cacerts/receipt
line diff
     1.1 --- a/cacerts/receipt	Thu Dec 08 13:26:44 2016 +0100
     1.2 +++ b/cacerts/receipt	Fri Dec 09 03:40:48 2016 +0200
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="cacerts"
     1.7 -VERSION="20160512"
     1.8 +VERSION="20161124"
     1.9  CATEGORY="security"
    1.10  SHORT_DESC="Certificate Authority Certificates"
    1.11  MAINTAINER="al.bobylev@gmail.com"
    1.12 @@ -13,7 +13,7 @@
    1.13  HOST_ARCH="any"
    1.14  
    1.15  DEPENDS="openssl"
    1.16 -BUILD_DEPENDS="openssl locale-en"
    1.17 +BUILD_DEPENDS="perl openssl locale-en"
    1.18  
    1.19  # Rules to configure and make the package.
    1.20  compile_rules()
    1.21 @@ -35,22 +35,19 @@
    1.22  
    1.23  post_install()
    1.24  {
    1.25 -	case "$1" in
    1.26 -		/cross*) return
    1.27 -	esac
    1.28 +	# Rehash certificates.
    1.29 +	# Use simplified plain shell equivalent to the Perl `c_rehash`
    1.30 +	# (see openssl package). Normal no output here.
    1.31 +	cd "$1/etc/ssl/certs"
    1.32 +	find . -type l -delete
    1.33 +	for i in $(ls *.pem); do
    1.34 +		j="$(openssl x509 -hash -noout -in $i)"
    1.35 +		[ -n "$j" ] && ln -s $i $j.0
    1.36 +	done
    1.37 +}
    1.38  
    1.39 -	# Keep silence, for example, when installed on cook as build dependency
    1.40 -	if [ -z "$quiet" ]; then
    1.41 -		echo "Rehash certificates:"
    1.42 -		out='&1'
    1.43 -	else
    1.44 -		out='/dev/null'
    1.45 -	fi
    1.46 -
    1.47 -	if [ -d "$1/$INSTALLED/perl" ]; then
    1.48 -		chroot "$1/" c_rehash >$out
    1.49 -	else
    1.50 -		tazpkg -gi microperl --root="${1:-/}"
    1.51 -		chroot "$1/" microperl /usr/bin/c_rehash >$out
    1.52 -	fi
    1.53 +post_remove()
    1.54 +{
    1.55 +	# Remove broken symlinks
    1.56 +	find "$1/etc/ssl/certs" -type l ! -exec test -e \{\} \; -delete
    1.57  }