aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptrcnull <git@ptrcnull.me>2022-08-03 06:51:37 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-08-08 10:43:04 +0000
commitbe3a92063877d6d632406dc8c6ecb4a9070ca6d9 (patch)
treedeca1ec59f2bdbf106b40fd2fe37190d1012e269
parent050ba2508edeef9ab73b62fca7018bae4b9647bb (diff)
downloadaports-be3a92063877d6d632406dc8c6ecb4a9070ca6d9.tar.gz
aports-be3a92063877d6d632406dc8c6ecb4a9070ca6d9.tar.bz2
aports-be3a92063877d6d632406dc8c6ecb4a9070ca6d9.tar.xz
main/pinentry: add post-deinstall script for pinentry-curses-ss
fixes #13675
-rw-r--r--main/pinentry/APKBUILD9
-rw-r--r--main/pinentry/pinentry-curses-ss.post-deinstall12
2 files changed, 19 insertions, 2 deletions
diff --git a/main/pinentry/APKBUILD b/main/pinentry/APKBUILD
index 510d145dfb..2c017595dd 100644
--- a/main/pinentry/APKBUILD
+++ b/main/pinentry/APKBUILD
@@ -2,12 +2,17 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pinentry
pkgver=1.2.0
-pkgrel=0
+pkgrel=1
pkgdesc="Collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol"
url="https://www.gnupg.org/aegypten2/"
arch="all"
license="GPL-2.0-or-later"
-install="$pkgname.post-install $pkgname.post-upgrade $pkgname-curses-ss.post-install"
+install="
+ $pkgname.post-install
+ $pkgname.post-upgrade
+ $pkgname-curses-ss.post-install
+ $pkgname-curses-ss.post-deinstall
+ "
makedepends="ncurses-dev libcap-dev libgpg-error-dev libassuan-dev gcr-dev libsecret-dev"
subpackages="$pkgname-doc $pkgname-tty $pkgname-curses-ss:_curses_ss"
source="https://gnupg.org/ftp/gcrypt/pinentry/pinentry-$pkgver.tar.bz2"
diff --git a/main/pinentry/pinentry-curses-ss.post-deinstall b/main/pinentry/pinentry-curses-ss.post-deinstall
new file mode 100644
index 0000000000..3be2297975
--- /dev/null
+++ b/main/pinentry/pinentry-curses-ss.post-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ "$(readlink /usr/bin/pinentry)" = "pinentry-curses-ss" ]; then
+ rm /usr/bin/pinentry
+
+ # restore symlink to pinentry-curses, if exists
+ if [ -x "/usr/bin/pinentry-curses" ]; then
+ ln -sfv pinentry-curses /usr/bin/pinentry
+ fi
+fi
+
+exit 0