aboutsummaryrefslogtreecommitdiffstats
path: root/main/pinentry/APKBUILD
blob: 169813b8f949427bd6187c15349162e43d1597b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pinentry
pkgver=1.3.0
pkgrel=0
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
	$pkgname-curses-ss.post-deinstall
	"
makedepends="ncurses-dev libcap-dev libgpg-error-dev libassuan-dev libsecret-dev"
subpackages="$pkgname-doc $pkgname-tty $pkgname-curses-ss:_curses_ss"
source="https://gnupg.org/ftp/gcrypt/pinentry/pinentry-$pkgver.tar.bz2"

prepare() {
	default_prepare

	cp -ar "$builddir" "$builddir-libsecret"
}

build() {
	_build \
		--disable-libsecret \
		--enable-pinentry-curses \
		--enable-pinentry-tty

	cd "$builddir-libsecret"
	_build \
		--enable-libsecret \
		--enable-pinentry-curses \
		--disable-pinentry-tty
}

_build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-pinentry-gtk2 \
		--disable-pinentry-gnome3 \
		--disable-pinentry-qt \
		--enable-fallback-curses \
		"$@"
	make
}

check() {
	make check
}

package() {
	make -C "$builddir" DESTDIR="$pkgdir" install

	# created by post install scripts so we can override with other UI versions
	rm -f "$pkgdir"/usr/bin/pinentry
}

_curses_ss() {
	pkgdesc="Curses-based PIN or pass-phrase entry dialog for GnuPG with Secret Service support"

	install -D -m 755 "$builddir-libsecret"/curses/pinentry-curses \
		"$subpkgdir"/usr/bin/pinentry-curses-ss
}

tty() {
	pkgdesc="Minimal dumb-terminal PIN or pass-phrase entry dialog for GnuPG"

	amove usr/bin/pinentry-tty
}

sha512sums="
1bbac81c6811cffc8969a46494e6daa6b8447802f47ff6fa3e4dc9ac244cf6e5f629834c9b6a60770d06bff6c9932ad4059f10d2fdf93fd9e26fd5d21c0e3732  pinentry-1.3.0.tar.bz2
"