pkgname="make-ca"
pkgver=1.16.1
pkgdesc="Mozilla's set of trusted CA certificates"
homepage="https://firefox-source-docs.mozilla.org/security/nss/index.html"
arch=(x86_64)
license=(MPL-2.0)
sources=("${pkgname}-${pkgver}.tar.gz"
  "pythoncerts.sh"
)
urls=("https://github.com/lfs-book/make-ca/archive/v${pkgver}/${sources[0]}"
  "pythoncerts.sh"
)
md5sums=("bf9cea2d24fc5344d4951b49f275c595"
  "e04ade84d0092e803bcba2b70ae349d3"
)

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  :
}

src_check() {
  :
}

src_install() {
  make DESTDIR="${pkgdir}" install &&
  install -vdm755 "${pkgdir}"/etc/ssl/local
  install -vDm644 ${distdir}/${sources[1]} ${pkgdir}/etc/profile.d/${sources[1]}
}

src_postinstall() {
  /usr/sbin/make-ca -g &&
  systemctl enable update-pki.timer
}

