summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-04 15:09:32 +0100
committerdavidovski <david@davidovski.xyz>2022-06-04 15:09:32 +0100
commitdd57027830c597590a3b5fd90b1084a8f3616c18 (patch)
tree418b3229a9a3fb93ff43ac11de7a899f42109934
parent873665024ebfaa761ee49b508a79db7178aeb778 (diff)
added pinentry
-rw-r--r--repo/gnupg/gnupg.xibuild2
-rw-r--r--repo/pinentry/pinentry-curses-ss.post-install9
-rw-r--r--repo/pinentry/pinentry.post-install9
-rw-r--r--repo/pinentry/pinentry.post-upgrade12
-rw-r--r--repo/pinentry/pinentry.xibuild57
5 files changed, 88 insertions, 1 deletions
diff --git a/repo/gnupg/gnupg.xibuild b/repo/gnupg/gnupg.xibuild
index 95ffa44..3b4d8ec 100644
--- a/repo/gnupg/gnupg.xibuild
+++ b/repo/gnupg/gnupg.xibuild
@@ -3,7 +3,7 @@
NAME="gnupg"
DESC="GNU Privacy Guard 2 - meta package for full GnuPG suite"
-MAKEDEPS=" autoconf automake bzip2 gettext gnutls libassuan libgcrypt libgpg-error libksba libtool libusb npth openldap pinentry sqlite texinfo zlib"
+MAKEDEPS=" autoconf automake bzip2 gettext gnutls libassuan libgcrypt libgpg-error libksba libtool libusb npth openldap pinentry sqlite3 texinfo zlib"
PKG_VER=2.2.34
SOURCE="https://gnupg.org/ftp/gcrypt/gnupg/gnupg-$PKG_VER.tar.bz2"
diff --git a/repo/pinentry/pinentry-curses-ss.post-install b/repo/pinentry/pinentry-curses-ss.post-install
new file mode 100644
index 0000000..4035469
--- /dev/null
+++ b/repo/pinentry/pinentry-curses-ss.post-install
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+for i in gtk-2 gnome qt; do
+ [ -f /usr/bin/pinentry-$i ] && exit 0
+done
+
+ln -sf pinentry-curses-ss /usr/bin/pinentry
+
+exit 0
diff --git a/repo/pinentry/pinentry.post-install b/repo/pinentry/pinentry.post-install
new file mode 100644
index 0000000..73ef9c0
--- /dev/null
+++ b/repo/pinentry/pinentry.post-install
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+for i in curses-ss gtk-2 gnome qt; do
+ [ -f /usr/bin/pinentry-$i ] && exit 0
+done
+
+ln -sf pinentry-curses /usr/bin/pinentry
+
+exit 0
diff --git a/repo/pinentry/pinentry.post-upgrade b/repo/pinentry/pinentry.post-upgrade
new file mode 100644
index 0000000..ac193c7
--- /dev/null
+++ b/repo/pinentry/pinentry.post-upgrade
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+ver_old="$2"
+
+if [ "$(apk version -t "$ver_old" '1.1.1-r1')" = '<' ]; then
+ cat >&2 <<-EOF
+ *
+ * If you use pinentry-curses with Secret Service (for password caching),
+ * install package pinentry-curses-ss.
+ *
+ EOF
+fi
diff --git a/repo/pinentry/pinentry.xibuild b/repo/pinentry/pinentry.xibuild
new file mode 100644
index 0000000..c8fa0a7
--- /dev/null
+++ b/repo/pinentry/pinentry.xibuild
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+NAME="pinentry"
+DESC="Collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol"
+
+MAKEDEPS=" ncurses libcap libgpg-error libassuan gcr libsecret"
+
+PKG_VER=1.2.0
+SOURCE="https://gnupg.org/ftp/gcrypt/pinentry/pinentry-$PKG_VER.tar.bz2"
+
+ADDITIONAL="
+pinentry-curses-ss.post-install
+pinentry.post-install
+pinentry.post-upgrade
+"
+
+prepare() {
+ default_prepare
+
+ cp -ar "$BUILD_ROOT" "$BUILD_ROOT-libsecret"
+}
+
+build() {
+ _build \
+ --disable-libsecret \
+ --enable-pinentry-curses \
+ --enable-pinentry-tty
+
+ cd "$BUILD_ROOT-libsecret"
+ _build \
+ --enable-libsecret \
+ --enable-pinentry-curses \
+ --disable-pinentry-tty
+}
+
+_build() {
+ ./configure \
+ --prefix=/usr \
+ --disable-pinentry-gtk2 \
+ --disable-pinentry-gnome3 \
+ --disable-pinentry-qt \
+ --enable-fallback-curses \
+ "$@"
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make -C "$BUILD_ROOT" DESTDIR="$PKG_DEST" install
+
+ # created by post install scripts so we can override with other UI versions
+ rm -f "$PKG_DEST"/usr/bin/pinentry
+}
+