diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-07-14 02:35:56 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-07-14 02:36:14 -0500 |
commit | 802b48187a42d3a54dcbc3f8ec2fae7152def059 (patch) | |
tree | bc7fc61c0b6b5894e519d6841076f8370c0ba275 /user | |
parent | 217fa2e1fff31221e835568769a57bc278753ae2 (diff) | |
download | packages-802b48187a42d3a54dcbc3f8ec2fae7152def059.tar.gz packages-802b48187a42d3a54dcbc3f8ec2fae7152def059.tar.bz2 packages-802b48187a42d3a54dcbc3f8ec2fae7152def059.tar.xz packages-802b48187a42d3a54dcbc3f8ec2fae7152def059.zip |
user/pinentry: pull in, take, fix up, write custom pinentry
Diffstat (limited to 'user')
-rw-r--r-- | user/pinentry/APKBUILD | 61 | ||||
-rw-r--r-- | user/pinentry/pinentry | 12 |
2 files changed, 73 insertions, 0 deletions
diff --git a/user/pinentry/APKBUILD b/user/pinentry/APKBUILD new file mode 100644 index 000000000..4bacb46e7 --- /dev/null +++ b/user/pinentry/APKBUILD @@ -0,0 +1,61 @@ +# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=pinentry +pkgver=1.1.0 +pkgrel=1 +pkgdesc="Collection of passphrase entry handlers for the Assuan protocol" +url="https://www.gnupg.org/related_software/pinentry/" +arch="all" +license="GPL-2.0+" +depends="" +makedepends="gtk+-dev libassuan-dev libcap-dev libgpg-error-dev ncurses-dev + qt5-qtbase-dev" +subpackages="$pkgname-doc $pkgname-gtk $pkgname-qt5" +source="ftp://ftp.gnupg.org/gcrypt/$pkgname/$pkgname-$pkgver.tar.bz2 + pinentry" + +build () { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --disable-pinentry-gtk \ + --enable-pinentry-gtk2 \ + --enable-pinentry-qt \ + --enable-pinentry-curses \ + --enable-fallback-curses + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install + + rm -f "$pkgdir"/usr/bin/pinentry + install -D -m755 "$srcdir"/pinentry "$pkgdir"/usr/bin/pinentry +} + +gtk() { + pkgdesc="GTK+ passphrase entry handler" + install_if="$pkgname=$pkgver-r$pkgrel gtk+2.0" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/pinentry-gtk* \ + "$subpkgdir"/usr/bin/ +} + +qt5() { + pkgdesc="Qt 5 passphrase entry handler" + install_if="$pkgname=$pkgver-r$pkgrel qt5-qtbase" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/pinentry-qt* \ + "$subpkgdir"/usr/bin/ +} + +sha512sums="5012672925bcb5f683358c259e55e4b87c67cf063ad52c759308933733025c33f7ce08e5b8019ffc101cbf7ef30499040ef2fd34a7611698e65e1593f80948cd pinentry-1.1.0.tar.bz2 +3a6fbbe2ccdbf8d6ed5fddd960fabe9276b04d8ca1a14dded8a5f0de4b8de1636dee2cd343f2db8ff78a66b339faa6d517316f296ca924b8b2add9666f80c433 pinentry" diff --git a/user/pinentry/pinentry b/user/pinentry/pinentry new file mode 100644 index 000000000..fd5b1bd8e --- /dev/null +++ b/user/pinentry/pinentry @@ -0,0 +1,12 @@ +#!/bin/sh +# This file is free software. +# It is licensed under LGPL-2.1+ OR NCSA (the Adélie Linux license). + +# Determine if X11 is running for the current user. +if [ -n $DISPLAY ]; then + [ -f /usr/bin/pinentry-qt ] && exec /usr/bin/pinentry-qt + [ -f /usr/bin/pinentry-gtk-2 ] && exec /usr/bin/pinentry-gtk-2 +fi + +# Ok, either no X11, or no Qt5/Gtk frontend. +exec /usr/bin/pinentry-curses |