# Maintainer: Daniel Langbein <daniel@systemli.org>
_pkgname=gnupg
_reponame=arch
pkgname="de-p1st-$_pkgname"
pkgver=0.0.9
pkgrel=1
pkgdesc="gnupg with configuration"
arch=('any')
url="https://codeberg.org/privacy1st/${_reponame}"
license=('MIT')
depends=('gnupg' 'holo' 'git' 'base')
makedepends=('git')
install='.install'
source=("git+${url}.git")
noextract=()
sha256sums=('SKIP')

package() {
  cd "${_reponame}/pkg/${pkgname}"

  install -dm0700                "$pkgdir"/etc/skel/.gnupg/
  install -Dm0600 gpg.conf       "$pkgdir"/etc/skel/.gnupg/gpg.conf
  install -Dm0600 gpg-agent.conf "$pkgdir"/etc/skel/.gnupg/gpg-agent.conf

  install -Dm0544 interactive-shell.holoscript "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/bash.bashrc.holoscript
  install -Dm0544 interactive-shell.holoscript "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/zsh/zshrc.holoscript

  install -Dm0644 94F3D3DDAC22802258FC044B6C47C753F0823002.pub "$pkgdir"/usr/share/gnupg/94F3D3DDAC22802258FC044B6C47C753F0823002.pub
  install -Dm0644 99_import_pubkey.sh "$pkgdir"/etc/profile.d/99_import_pubkey.sh
}
