summaryrefslogtreecommitdiffstats
path: root/abs/core/gnupg/install
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-02-13 23:08:48 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-02-13 23:08:48 (GMT)
commitd926803a7b730ee199a59f99b908c9daffb5c587 (patch)
tree88f73b23b844d3ab4ac46b71a77d884ceb0ef9a0 /abs/core/gnupg/install
parente8c87f84aeb8d61ce176fae568fc9aeaea69ff54 (diff)
downloadlinhes_pkgbuild-d926803a7b730ee199a59f99b908c9daffb5c587.zip
linhes_pkgbuild-d926803a7b730ee199a59f99b908c9daffb5c587.tar.gz
linhes_pkgbuild-d926803a7b730ee199a59f99b908c9daffb5c587.tar.bz2
gnupg: update to 2.2.4
Diffstat (limited to 'abs/core/gnupg/install')
-rw-r--r--abs/core/gnupg/install43
1 files changed, 32 insertions, 11 deletions
diff --git a/abs/core/gnupg/install b/abs/core/gnupg/install
index 3a5dc9f..95cb351 100644
--- a/abs/core/gnupg/install
+++ b/abs/core/gnupg/install
@@ -1,20 +1,41 @@
-info_dir=/usr/share/info
-info_files=(gnupg.info gnupg.info-1 gnupg.info-2)
+_global_units() {
+ _units=(dirmngr.socket gpg-agent.socket gpg-agent-{browser,extra,ssh}.socket)
+ _dir=/etc/systemd/user/sockets.target.wants
+
+ case $1 in
+ enable)
+ mkdir -p $_dir
+ for _u in "${_units[@]}"; do
+ ln -sf /usr/lib/systemd/user/$_u $_dir/$_u
+ done
+ ;;
+ disable)
+ for _u in "${_units[@]}"; do
+ rm -f $_dir/$_u
+ done
+ rmdir -p --ignore-fail-on-non-empty $_dir
+ ;;
+ esac
+}
post_install() {
- [ -x usr/bin/install-info ] || return 0
- for f in ${info_files[@]}; do
- usr/bin/install-info ${info_dir}/$f ${info_dir}/dir 2> /dev/null
- done
+ # See FS#42798 and FS#47371
+ dirmngr </dev/null &>/dev/null
+
+ # Let systemd supervise daemons by default
+ _global_units enable
}
post_upgrade() {
- post_install $1
+ if (( $(vercmp $2 2.1.13-1) < 0 )); then
+ echo "==> Please kill running gpg-agent and dirmngr processes before using this release."
+ fi
+
+ if (( $(vercmp $2 2.1.21-3) < 0 )); then
+ _global_units enable
+ fi
}
pre_remove() {
- [ -x usr/bin/install-info ] || return 0
- for f in ${info_files[@]}; do
- usr/bin/install-info --delete ${info_dir}/$f ${info_dir}/dir 2> /dev/null
- done
+ _global_units disable
}