# Maintainer: Rafael Fontenelle # Contributor: Tiago Brait pkgname=ca-certificates-icp_br pkgver=20200217 pkgrel=1 pkgdesc="Brazilian government Certification Authorities" arch=('any') url="https://www.iti.gov.br/repositorio/repositorio-ac-raiz" license=('unknown') depends=('ca-certificates-utils') makedepends=('unzip') source=("icpbr_certs-${pkgver}-${pkgrel}.zip::http://acraiz.icpbrasil.gov.br/credenciadas/CertificadosAC-ICP-Brasil/ACcompactado.zip") sha512sums=('d0c193833f384ac8e163868471f73d7cef3b1410bdcdc78bd74f7a64d0ea9c1f1525d3fe48a0f6401842cb95942b916de066b87a5a2f04c6fcda3623fc23179a') noextract=("icpbr_certs-${pkgver}-${pkgrel}.zip") _source="icpbr_certs-${pkgver}-${pkgrel}" prepare() { rm -rf "$_source" && mkdir "$_source" unzip "$_source.zip" -d "$_source" } package() { cd "$_source" find * -print0 | while read -d $'\0' cert; do # Edit filenames removing whitespaces and prepending 'icp_br' mv "$cert" "icp_br.${cert//' '/'_'}" done install -d -m0755 "$pkgdir/usr/share/ca-certificates/trust-source/anchors" install -m0644 *.crt "$pkgdir/usr/share/ca-certificates/trust-source/anchors" }