pkgname=ca-certificates pkgver=202200601 pkgrel=2 ext=doc fetch(){ curl http://ftp.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_20200601~deb10u2.tar.xz -o $pkgname-$pkgver.tar.gz tar -xf $pkgname-$pkgver.tar.gz mv work $pkgname-$pkgver cd $pkgname-$pkgver patch -p1 < ../../libressl-update-rehash.patch } build() { cd $pkgname-$pkgver gmake } package() { cd $pkgname-$pkgver mkdir -p $pkgdir/usr/bin mkdir -p $pkgdir/usr/sbin mkdir -p $pkgdir/etc/ssl/ mkdir -p $pkgdir/etc/ca-certificates/update.d mkdir -p $pkgdir/usr/share/ca-certificates/ gmake install DESTDIR="$pkgdir" ( echo "# Automatically generated by ${pkgname}-${pkgver}-${pkgrel}" echo "# $(date -u)" echo "# Do not edit." cd "$pkgdir"/usr/share/ca-certificates find . -name '*.crt' | sort | cut -b3- ) > "$pkgdir"/etc/ca-certificates.conf cat > "$pkgdir"/etc/ca-certificates/update.d/certhash <<-EOF #!/bin/sh exec openssl certhash /etc/ssl/certs EOF cat "$pkgdir"/usr/share/ca-certificates/mozilla/*.crt > $pkgdir/etc/ssl/cert.pem chmod +x "$pkgdir"/etc/ca-certificates/update.d/certhash } package_doc() { cd $pkgname-$pkgver install -d $pkgdir/usr/share/man/man8 install -Dm644 ./sbin/update-ca-certificates.8 $pkgdir/usr/share/man/man8 } license() { cd $pkgname-$pkgver cat debian/copyright }