# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="4" inherit eutils unpacker DESCRIPTION="Common CA Certificates PEM files" HOMEPAGE="http://packages.debian.org/sid/ca-certificates" #NMU_PR="1" SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb" LICENSE="MPL-1.1" SLOT="0" KEYWORDS="amd64 x86" IUSE="" # platforms like AIX don't have a good ar DEPEND="kernel_AIX? ( app-arch/deb2targz ) ! "${S}${EPREFIX}"/etc/ca-certificates.conf sh "${S}${EPREFIX}"/usr/sbin/update-ca-certificates --root "${S}" || die } src_install() { cp -pPR . "${D}"/ || die mv "${ED}"/usr/share/doc/{ca-certificates,${PF}} || die echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates doenvd 98ca-certificates } pkg_postinst() { if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then # if the user has local certs, we need to rebuild again # to include their stuff in the db. # However it's too overzealous when the user has custom certs in place. # --fresh is to clean up dangling symlinks "${EROOT}"/usr/sbin/update-ca-certificates --root "${EROOT}" fi local c badcerts=0 for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do ewarn "Broken symlink for a certificate at $c" badcerts=1 done if [ $badcerts -eq 1 ]; then ewarn "Removing the following broken symlinks:" ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)" fi }