summaryrefslogtreecommitdiff
path: root/sys-auth/pam_u2f/pam_u2f-1.4.0.ebuild
blob: 5f4fec9883865cf5cac1048a06df66d6cb5f8ee4 (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
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake pam

DESCRIPTION="PAM module for FIDO2 and U2F keys"
HOMEPAGE="https://github.com/Yubico/pam-u2f"
SRC_URI="https://developers.yubico.com/${PN/_/-}/Releases/${P}.tar.gz"

LICENSE="BSD ISC"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86"
IUSE="test"
RESTRICT="!test? ( test )"

DEPEND="
	dev-libs/libfido2:=
	dev-libs/openssl:=
	sys-libs/pam
"
RDEPEND="${DEPEND}"
BDEPEND="app-text/asciidoc"

src_configure() {
	local mycmakeargs=(
		-DPAM_DIR=$(getpam_mod_dir)
	)
	if use test; then
		mycmakeargs+=(
			-DBUILD_TESTING=ON
		)
	else
		mycmakeargs+=(
			-DBUILD_TESTING=OFF
		)
	fi

	cmake_src_configure
}