diff --git a/pkg/de-p1st-gnupg/.install b/pkg/de-p1st-gnupg/.install new file mode 100644 index 0000000..b754ef5 --- /dev/null +++ b/pkg/de-p1st-gnupg/.install @@ -0,0 +1,15 @@ +## arg 1: the new package version +post_install() { + holo apply +} + +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + holo apply +} + +## arg 1: the old package version +post_remove() { + holo apply +} diff --git a/pkg/de-p1st-gnupg/PKGBUILD b/pkg/de-p1st-gnupg/PKGBUILD index 769dbe7..a4fae71 100644 --- a/pkg/de-p1st-gnupg/PKGBUILD +++ b/pkg/de-p1st-gnupg/PKGBUILD @@ -2,14 +2,15 @@ _pkgname=gnupg _reponame=arch pkgname="de-p1st-$_pkgname" -pkgver=0.0.4 -pkgrel=2 +pkgver=0.0.5 +pkgrel=1 pkgdesc="gnupg with configuration" arch=('any') url="https://codeberg.org/privacy1st/${_reponame}" license=('MIT') -depends=('gnupg') +depends=('gnupg' 'holo' 'git' 'base') makedepends=('git') +install='.install' source=("git+${url}.git" 'git+https://github.com/ioerror/duraconf.git') noextract=() sha256sums=('SKIP' 'SKIP') @@ -31,5 +32,5 @@ package() { install -Dm0600 gpg.conf "$pkgdir"/etc/skel/.gnupg/gpg.conf install -Dm0600 gpg-agent.conf "$pkgdir"/etc/skel/.gnupg/gpg-agent.conf - install -Dm0644 99_gnupg.sh "$pkgdir"/etc/profile.d/99_gnupg.sh + install -Dm0544 zshrc.holoscript "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/zsh/zshrc } diff --git a/pkg/de-p1st-gnupg/README.md b/pkg/de-p1st-gnupg/README.md index bf17bfd..f5153af 100644 --- a/pkg/de-p1st-gnupg/README.md +++ b/pkg/de-p1st-gnupg/README.md @@ -83,9 +83,6 @@ gpg-connect-agent updatestartuptty /bye >/dev/null One's login shell should run the following. -**Note**: `/etc/profile.d/99_gnupg.sh` does **not** work! -**TODO** maybe was just wrong permission? - ```shell unset SSH_AGENT_PID if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then @@ -93,3 +90,10 @@ if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then export SSH_AUTH_SOCK fi ``` + + +--- + +**Note**: +* `/etc/profile.d/99_gnupg.sh` does **not** work! +* `/etc/X11/xinit/xinitrc.d/` \ No newline at end of file diff --git a/pkg/de-p1st-gnupg/99_gnupg.sh b/pkg/de-p1st-gnupg/zshrc.holoscript similarity index 71% rename from pkg/de-p1st-gnupg/99_gnupg.sh rename to pkg/de-p1st-gnupg/zshrc.holoscript index 451caa8..5f44bf0 100644 --- a/pkg/de-p1st-gnupg/99_gnupg.sh +++ b/pkg/de-p1st-gnupg/zshrc.holoscript @@ -1,4 +1,9 @@ -GPG_TTY=$(tty) +#!/bin/sh +# stdin: default config +# stdout: modified config +cat + +echo 'GPG_TTY=$(tty) export GPG_TTY gpg-connect-agent updatestartuptty /bye >/dev/null @@ -6,4 +11,4 @@ unset SSH_AGENT_PID if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" export SSH_AUTH_SOCK -fi +fi' \ No newline at end of file