summaryrefslogtreecommitdiff
blob: 2a2d4d1fcdf9adda8ad4da05610b60d38033ebfa (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

DESCRIPTION="PKCS#11 support for GnuPG"
HOMEPAGE="http://gnupg-pkcs11.sourceforge.net"
SRC_URI="https://github.com/alonbl/${PN}/releases/download/${P}/${P}.tar.bz2"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="proxy"

DEPEND="
	dev-libs/openssl:0=
	dev-libs/libassuan:=
	dev-libs/libgcrypt:=
	dev-libs/libgpg-error:=
	dev-libs/pkcs11-helper:=
"
RDEPEND="
	${DEPEND}
	proxy? (
		acct-group/gnupg-pkcs11
		acct-group/gnupg-pkcs11-scd-proxy
		acct-user/gnupg-pkcs11-scd-proxy
	)
"
BDEPEND="virtual/pkgconfig"

src_configure() {
	local myeconfargs=(
		$(use_enable proxy)
		--with-proxy-socket=/run/gnupg-pkcs11-scd-proxy/cmd
	)

	econf "${myeconfargs[@]}"
}

src_install() {
	default

	if use proxy; then
		newinitd "${FILESDIR}/gnupg-pkcs11-scd-proxy.initd" gnupg-pkcs11-scd-proxy
		newconfd "${FILESDIR}/gnupg-pkcs11-scd-proxy.confd" gnupg-pkcs11-scd-proxy
	fi
}