iglunix/pkgs/ca-certificates/build.sh

57 lines
1.3 KiB
Bash
Raw Normal View History

2021-02-03 12:42:17 +00:00
pkgname=ca-certificates
pkgver=202200601
pkgrel=2
2021-02-03 13:46:17 +00:00
ext=doc
2021-02-03 12:42:17 +00:00
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
2021-02-03 13:41:01 +00:00
mv work $pkgname-$pkgver
cd $pkgname-$pkgver
patch -p1 < ../../libressl-update-rehash.patch
2021-02-03 12:42:17 +00:00
}
build() {
2021-02-03 13:41:01 +00:00
cd $pkgname-$pkgver
gmake
2021-02-03 12:42:17 +00:00
}
package() {
2021-02-03 13:41:01 +00:00
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/
2021-02-03 12:42:17 +00:00
2021-02-03 13:41:01 +00:00
gmake install DESTDIR="$pkgdir"
2021-02-03 12:42:17 +00:00
(
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-
2021-02-03 13:41:01 +00:00
) > "$pkgdir"/etc/ca-certificates.conf
2021-02-03 12:42:17 +00:00
2021-02-03 13:41:01 +00:00
cat > "$pkgdir"/etc/ca-certificates/update.d/certhash <<-EOF
2021-02-03 12:42:17 +00:00
#!/bin/sh
2021-02-03 13:41:01 +00:00
exec openssl certhash /etc/ssl/certs
2021-02-03 12:42:17 +00:00
EOF
2021-02-03 13:41:01 +00:00
cat "$pkgdir"/usr/share/ca-certificates/mozilla/*.crt > $pkgdir/etc/ssl/cert.pem
chmod +x "$pkgdir"/etc/ca-certificates/update.d/certhash
}
2021-02-03 13:46:17 +00:00
package_doc() {
cd $pkgname-$pkgver
install -d $pkgdir/usr/share/man/man8
install -Dm644 ./sbin/update-ca-certificates.8 $pkgdir/usr/share/man/man8
}
2021-02-03 13:41:01 +00:00
license() {
cd $pkgname-$pkgver
cat debian/copyright
2021-02-03 12:42:17 +00:00
}