void-packages/srcpkgs/ca-certificates/template
2021-10-01 16:46:09 +07:00

45 lines
1.4 KiB
Bash

# Template file for 'ca-certificates'
pkgname=ca-certificates
version=20210119+3.71
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
99acd315d9af35419cda4a6960f00a7d446bd231bd407174a7b07cb3dba0c253"
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
}