### this file is sourced not run
PKGVER=2019.12
PKGBUILD=1
PKGARCH=noarch

TARBALL=
MD5SUM=
SRC_URL=
BUNDLE=

SLACKREQ= # make-ca built-time only
SLACKDESC="lfs-cacert: lfs-cacert $PKGVER (CA Certificates)  
lfs-cacert:  
lfs-cacert: These are Certificate Authority (CA) certificates build from 
lfs-cacert: Mozilla collections. Used in conjunction with SSL/TLS and other 
lfs-cacert: crypto-protected programs, it can be used to confirm whether a 
lfs-cacert: site is what it claims it is.  
lfs-cacert: 
lfs-cacert: 
lfs-cacert: 
lfs-cacert: 
lfs-cacert:
"
SLACKSUG=lfs-cacert-tools

### standard pkg_download

### prepare
pkg_prepare() {
	: nothing to prepare
}

### default pkg_package

### build
pkg_build() {
	echo "nameserver 9.9.9.9" > /etc/resolv.conf &&
	make-ca -g -f &&
	pkg_build_slackdesc &&
	rm -f /etc/resolv.conf &&

	# compat symlinks
	for p in ca-bundle.crt objsign-ca-bundle.crt email-ca-bundle.crt; do
		ln -s ../pki/tls/certs/$p /etc/ssl/$p
	done
}
