upg pinentry

This commit is contained in:
joborun linux 2024-07-03 10:56:17 +03:00
parent 846ef3bca1
commit 369840b32b
4 changed files with 46 additions and 21 deletions

View file

@ -7,17 +7,18 @@
pkgname=pinentry
pkgver=1.3.0
pkgrel=02
pkgrel=03
pkgdesc='Collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol'
url='https://gnupg.org/related_software/pinentry/'
depends=('glibc' 'ncurses' 'libassuan' 'libsecret' 'glib2'
libsecret-1.so libncursesw.so libassuan.so libglib-2.0.so)
makedepends=('qt5-base' 'qt6-base' 'gcr' 'qt5-x11extras')
makedepends=('qt5-base' 'qt6-base' 'gcr' 'gtk2-compat' 'qt5-x11extras')
optdepends=(
'gcr: gnome3 backend'
'gtk3: gtk backend'
'qt5-base: qt5 backend'
'qt6-base: qt6 backend'
'qt5-x11extras: qt backend'
'gcr: gnome3 backend'
)
backup=('etc/pinentry/preexec')
source=("https://www.gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig}
@ -45,6 +46,10 @@ package() {
make DESTDIR="${pkgdir}" install
install -Dm 755 ../pinentry -t "${pkgdir}/usr/bin"
# The -gtk backend has been built to be used with GTK3.
mv "${pkgdir}/usr/bin/pinentry-gtk"{-2,}
}
#---- arch license gpg-key & sha256sums ----
@ -59,7 +64,7 @@ validpgpkeys=(D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 # Werner Koch (dist sig)
sha256sums=(9b3cd5226e7597f2fded399a3bc659923351536559e9db0826981bca316494de # pinentry-1.3.0.tar.bz2
3d4753e5262a36651dee14ea4e0e9461126d93fddd05f2da2ef95be4cb3ce1f0 # pinentry-1.3.0.tar.bz2.sig
af7c27139b20a7f1b9a227f3663abb21bb2b954523352b7844da27db1b0c1c86) # pinentry
40db39c6334917b79c77525451fc8e64861d1578e3e28da65a7870e66719d3e1) # pinentry
## 9e9f0153526977d65d8a41c1c6d92615ded55130d9f9037c3ce2f4db79d7081e pinentry-1.3.0-02-x86_64.pkg.tar.lz
## f8cd6c87f2f6d74b42f7bf7417f15fbf74a428e47dc1532b193fd1212bc1097c pinentry-1.3.0-03-x86_64.pkg.tar.lz

View file

@ -4,7 +4,7 @@
pkgname=pinentry
pkgver=1.3.0
pkgrel=2
pkgrel=3
pkgdesc='Collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol'
url='https://gnupg.org/related_software/pinentry/'
arch=('x86_64')
@ -12,18 +12,19 @@ license=('GPL')
depends=(
'glibc' 'ncurses' 'libassuan' 'libsecret' 'glib2'
libsecret-1.so libncursesw.so libassuan.so libglib-2.0.so)
makedepends=('qt6-base' 'qt5-x11extras' 'kwayland5' 'gcr')
makedepends=('qt6-base' 'qt5-x11extras' 'kwayland5' 'gtk2-compat' 'gcr')
optdepends=(
'qt5-x11extras: qt backend'
'kwayland5: qt backend'
'gcr: gnome3 backend'
'gtk3: gtk backend'
'kwayland5: qt backend'
'qt5-x11extras: qt backend'
)
backup=('etc/pinentry/preexec')
source=("https://www.gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig}
'pinentry')
sha256sums=('9b3cd5226e7597f2fded399a3bc659923351536559e9db0826981bca316494de'
'SKIP'
'983ae62694c7cbc5b8a573f9863c97a86135b32c5e5867f21c1be402c78e60a8')
'40db39c6334917b79c77525451fc8e64861d1578e3e28da65a7870e66719d3e1')
validpgpkeys=(
'D8692123C4065DEA5E0F3AB5249B39D24F25E3B6' # Werner Koch (dist sig)
'6DAA6E64A76D2840571B4902528897B826403ADA' # Werner Koch (dist signing 2020)
@ -47,8 +48,12 @@ build() {
package() {
cd "${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
install -Dm 755 ../pinentry -t "${pkgdir}/usr/bin"
# The -gtk backend has been built to be used with GTK3.
mv "${pkgdir}/usr/bin/pinentry-gtk"{-2,}
}
# vim: ts=2 sw=2 et:

View file

@ -5,5 +5,6 @@ libglvnd
qt5-x11extras
at-spi2-core
graphite
gtk2-compat

View file

@ -1,14 +1,28 @@
#!/bin/sh
#!/bin/bash
# user-defined pre-exec hook
test -r "${XDG_CONFIG_HOME:-$HOME/.config}"/pinentry/preexec &&
# Run user-defined and site-defined pre-exec hooks.
[[ -r "${XDG_CONFIG_HOME:-$HOME/.config}"/pinentry/preexec ]] && \
. "${XDG_CONFIG_HOME:-$HOME/.config}"/pinentry/preexec
[[ -r /etc/pinentry/preexec ]] && . /etc/pinentry/preexec
# site-defined pre-exec hook
test -r /etc/pinentry/preexec &&
. /etc/pinentry/preexec
# Guess preferred backend based on environment.
backends=(curses tty)
if [[ -n "$DISPLAY" ]]; then
case "$XDG_CURRENT_DESKTOP" in
KDE|LXQT|LXQt)
backends=(qt qt5 gnome3 gtk curses tty)
;;
*)
backends=(gnome3 gtk qt qt5 curses tty)
;;
esac
fi
test -e /usr/lib/libgtk-x11-2.0.so.0 &&
exec /usr/bin/pinentry-gtk-2 "$@"
for backend in "${backends[@]}"
do
lddout=$(ldd "/usr/bin/pinentry-$backend" 2>/dev/null) || continue
[[ "$lddout" == *'not found'* ]] && continue
exec "/usr/bin/pinentry-$backend" "$@"
done
exec /usr/bin/pinentry-curses "$@"
exit 1