# $Id$ PNAME="ca-certificates" PVER="20170717" PBUILD="r1" PCAT="app-crypt" DESCRIPTION="Common CA certificates." HOMEPAGE="http://packages.qa.debian.org/c/ca-certificates.html" DEPEND=">= dev-libs/openssl-1 >= app-shells/bash-4.2 >= sys-apps/coreutils-8 >= virtual/debianutils >= sys-apps/findutils-4.4 >= virtual/sed" SDEPEND=">= dev-lang/python-2.7" SRCFILE="${PNAME}_${PVER}.tar.xz" SRCDIR="${BUILDDIR}/${PNAME}" # do not strip libtool files and check not supported msetfeature "libtool" "!check" sminclude mbuild mtools SRC_URI=( http://ftp.debian.org/debian/pool/main/c/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2SUBSTITUTE="certificates_" UP2DATE="updatecmd 'http://ftp.debian.org/debian/pool/main/c/${PNAME}' | highesttarball xz" src_compile() { cd ${SRCDIR} mmake || die } src_install() { cd ${SRCDIR} # create cert directory structure mkeepdir /etc/ca-certificates/update.d || die mkeepdir /etc/ssl/certs || die minstalldir /usr/sbin || die minstalldir /usr/share/ca-certificates || die mmake DESTDIR=${BINDIR} install || die # create certs config MCONFIG="/etc/ca-certificates.conf" mclearconfig maddconfig "# Automatically generated by ${PKGNAME}-${PVER}-${PBUILD}" maddconfig '# Do not modifiy, see update-ca-certificates man page' maddconfig '#' cd ${BINDIR}/usr/share/ca-certificates find . -name '*.crt' | sort | cut -b3- >> ${BINDIR}/${MCONFIG} || die # mask certs config from etc protect minstalldir /etc/env.d || die MCONFIG="/etc/env.d/40ca-certificates" mclearconfig || die maddconfig 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' || die } postinstall() { if [[ ${MROOT} = / ]] || [[ -z ${MROOT} ]] then update-ca-certificates --fresh fi } postremove() { if [ ! -x ${MROOT}/usr/sbin/update-ca-certificates ] then rm -f ${MROOT}/etc/ssl/certs/ca-certificates.crt fi }