Merge pull request #3 from aheirman/patch-3

Add ca-certificates package
This commit is contained in:
Ella-0 2021-02-03 12:44:39 +00:00 committed by GitHub
commit 1b831f88fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,42 @@
pkgname=ca-certificates
pkgver=202200601
pkgrel=2
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
}
build() {
cd work
make
}
package() {
mkdir build
mkdir -p build/usr/bin
mkdir -p build/usr/sbin
mkdir -p build/etc/ssl/
mkdir -p build/usr/share/ca-certificates
make install DESTDIR="$pkgdir/build"
(
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/build"/etc/ca-certificates.conf
cat > "$pkgdir/build"/etc/ca-certificates/update.d/certhash <<-EOF
#!/bin/sh
exec /usr/bin/c_rehash /etc/ssl/certs
EOF
cat "$pkgdir/build"/usr/share/ca-certificates/mozilla/*.crt > $pkgdir/build/etc/ssl/cert.pem
chmod +x "$pkgdir/build"/etc/ca-certificates/update.d/certhash
mv -v ${pkgdir}/build/usr/sbin/* ${pkgdir}/build/usr/bin/
rm -rf ${pkgdir}/build/usr/sbin
}