void-packages/srcpkgs/ca-certificates/template

43 lines
1.3 KiB
Bash

# Template file for 'ca-certificates'
pkgname=ca-certificates
version=20240203+3.104
revision=1
_nss_version=${version#*+}
bootstrap=yes
conf_files="/etc/ca-certificates.conf"
build_wrksrc="ca-certificates"
hostmakedepends="openssl"
depends="openssl run-parts"
short_desc="Common CA certificates for SSL/TLS from Mozilla"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
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="3286d3fc42c4d11b7086711a85f865b44065ce05cf1fb5376b2abed07622a9c6
e2763223622d1e76b98a43030873856f248af0a41b03b2fa2ca06a91bc50ac8e"
post_extract() {
cp ${FILESDIR}/* $build_wrksrc/mozilla
}
do_configure() {
cp ../nss-${_nss_version}/nss/lib/ckfw/builtins/certdata.txt \
../nss-${_nss_version}/nss/lib/ckfw/builtins/nssckbi.h \
mozilla
}
do_build() {
make ${makejobs}
}
do_install() {
vmkdir usr/share/${pkgname}
vmkdir etc/ssl/certs
make install DESTDIR=${DESTDIR} SBINDIR=/usr/bin
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
}