git: 3cbf478ac8c1 - main - security/pam_u2f: New port

From: Romain Tartière <romain_at_FreeBSD.org>
Date: Mon, 06 Mar 2023 02:43:30 UTC
The branch main has been updated by romain:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3cbf478ac8c1261f14ba6ebbbb6ff525e3fe0e95

commit 3cbf478ac8c1261f14ba6ebbbb6ff525e3fe0e95
Author:     Romain Tartière <romain@FreeBSD.org>
AuthorDate: 2023-03-05 21:41:00 +0000
Commit:     Romain Tartière <romain@FreeBSD.org>
CommitDate: 2023-03-06 02:42:17 +0000

    security/pam_u2f: New port
    
    This module implements PAM over U2F and FIDO2, providing an easy way to
    integrate the YubiKey (or other U2F/FIDO2 compliant authenticators) into
    your existing infrastructure.
---
 security/Makefile          |  1 +
 security/pam_u2f/Makefile  | 32 ++++++++++++++++++++++++++++++++
 security/pam_u2f/distinfo  |  3 +++
 security/pam_u2f/pkg-descr |  3 +++
 4 files changed, 39 insertions(+)

diff --git a/security/Makefile b/security/Makefile
index b7d327237686..008983a629cd 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -732,6 +732,7 @@
     SUBDIR += pam_script
     SUBDIR += pam_search_list
     SUBDIR += pam_ssh_agent_auth
+    SUBDIR += pam_u2f
     SUBDIR += pam_yubico
     SUBDIR += pamtester
     SUBDIR += paperkey
diff --git a/security/pam_u2f/Makefile b/security/pam_u2f/Makefile
new file mode 100644
index 000000000000..7bff9b5e1ef7
--- /dev/null
+++ b/security/pam_u2f/Makefile
@@ -0,0 +1,32 @@
+PORTNAME=	pam_u2f
+DISTVERSIONPREFIX=${PORTNAME}-
+DISTVERSION=	1.2.1
+CATEGORIES=	security
+
+MAINTAINER=	romain@FreeBSD.org
+COMMENT=	Pluggable Authentication Module for U2F and FIDO2
+WWW=		https://developers.yubico.com/pam-u2f/
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+BUILD_DEPENDS=	a2x:textproc/asciidoc
+LIB_DEPENDS=	libfido2.so:security/libfido2
+
+USES=		autoreconf libtool pkgconfig ssl
+USE_GITHUB=	yes
+GH_ACCOUNT=	Yubico
+GH_PROJECT=	pam-u2f
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--with-pam-dir=${PREFIX}/lib
+
+PLIST_FILES=	bin/pamu2fcfg \
+		lib/pam_u2f.so \
+		man/man1/pamu2fcfg.1.gz \
+		man/man8/pam_u2f.8.gz
+
+.if !exists(/usr/libdata/pkgconfig/libcrypto.pc)
+CONFIGURE_ENV=	LIBCRYPTO_CFLAGS="-I${OPENSSLINC}" LIBCRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto"
+.endif
+
+.include <bsd.port.mk>
diff --git a/security/pam_u2f/distinfo b/security/pam_u2f/distinfo
new file mode 100644
index 000000000000..14a06ca91a67
--- /dev/null
+++ b/security/pam_u2f/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1678046721
+SHA256 (Yubico-pam-u2f-pam_u2f-1.2.1_GH0.tar.gz) = 2983d9fff6107219c1adcc4cbb2b563bbf6b7975aa642b34c5508f7924bdc450
+SIZE (Yubico-pam-u2f-pam_u2f-1.2.1_GH0.tar.gz) = 81481
diff --git a/security/pam_u2f/pkg-descr b/security/pam_u2f/pkg-descr
new file mode 100644
index 000000000000..6b17dd23e50c
--- /dev/null
+++ b/security/pam_u2f/pkg-descr
@@ -0,0 +1,3 @@
+This module implements PAM over U2F and FIDO2, providing an easy way to
+integrate the YubiKey (or other U2F/FIDO2 compliant authenticators) into your
+existing infrastructure.