void-packages/srcpkgs/ca-certificates/template

46 lines
1.4 KiB
Bash

# Template file for 'ca-certificates'
pkgname=ca-certificates
version=20210119+3.68
revision=1
_nss_version=${version#*+}
bootstrap=yes
conf_files="/etc/ca-certificates.conf"
create_wrksrc=yes
build_wrksrc="work"
hostmakedepends="openssl"
depends="openssl<=2.0_1 run-parts"
short_desc="Common CA certificates for SSL/TLS from Mozilla"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, MPL-2.0"
homepage="https://wiki.mozilla.org/NSS:Root_certs"
distfiles="${DEBIAN_SITE}/main/c/${pkgname}/${pkgname}_${version%+*}.tar.xz
${MOZILLA_SITE}/security/nss/releases/NSS_${_nss_version//\./_}_RTM/src/nss-${_nss_version}.tar.gz"
checksum="daa3afae563711c30a0586ddae4336e8e3974c2b627faaca404c4e0141b64665
c402b32cac83034ec1c3d826ef4306cd14a066d7d9a6f4c30d82b3bc043c725b"
post_extract() {
cp ${FILESDIR}/* $build_wrksrc/mozilla
cp nss-${_nss_version}/nss/lib/ckfw/builtins/certdata.txt \
nss-${_nss_version}/nss/lib/ckfw/builtins/nssckbi.h \
$build_wrksrc/mozilla
}
do_build() {
make ${makejobs}
}
do_install() {
# Cleanup previous run failure
rm -f ${DESTDIR}/usr/sbin
vmkdir usr/share/${pkgname}
vmkdir usr/bin
ln -s bin ${DESTDIR}/usr/sbin
vmkdir etc/ssl/certs
make install DESTDIR=${DESTDIR}
rm -f ${DESTDIR}/usr/sbin
vman sbin/update-ca-certificates.8
cd ${DESTDIR}/usr/share/ca-certificates
find . -name '*.crt' | sort | cut -b3- > ${DESTDIR}/etc/ca-certificates.conf
ln -s /etc/ssl/certs/ca-certificates.crt ${DESTDIR}/etc/ssl/certs.pem
}