[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / sysutils / swtpm

File: [cvs.NetBSD.org] / pkgsrc / sysutils / swtpm / Makefile (download)

Revision 1.2, Wed Oct 26 10:32:01 2022 UTC (3 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2022Q4-base, pkgsrc-2022Q4, HEAD
Changes since 1.1: +2 -1 lines

*: bump PKGREVISION for libunistring shlib major bump

# $NetBSD: Makefile,v 1.2 2022/10/26 10:32:01 wiz Exp $

GITHUB_PROJECT=	swtpm
GITHUB_TAG=	v${PKGVERSION_NOREV}
DISTNAME=	swtpm-0.7.0
PKGREVISION=	1
CATEGORIES=	sysutils
MASTER_SITES=	${MASTER_SITE_GITHUB:=stefanberger/}

MAINTAINER=	ryoon@NetBSD.org
HOMEPAGE=	https://github.com/stefanberger/swtpm/
COMMENT=	Software TPM (Trusted Platform Module) emulator
LICENSE=	modified-bsd

BUILD_DEPENDS+=		tcl-expect-[0-9]*:../../lang/tcl-expect
BUILD_DEPENDS+=		socat-[0-9]*:../../net/socat

SUBST_CLASSES+=		varbase
SUBST_STAGE.varbase=	pre-configure
SUBST_MESSAGE.varbase=	Use VARBASE
SUBST_FILES.varbase+=	configure.ac
SUBST_VARS.varbase=	VARBASE

BUILD_DEFS+=		VARBASE

USE_LANGUAGES+=		c

# Avoid `error: 'saved_stack.30' may be used uninitialized in this function [-Werror=maybe-uninitialized]` or similar errors
BUILDLINK_TRANSFORM+=	rm:-Werror

USE_LIBTOOL=		yes
USE_TOOLS=		automake bash gawk gmake pkg-config
GNU_CONFIGURE=		yes
CONFIGURE_SCRIPT=	autogen.sh
CONFIGURE_ARGS+=	--without-cuse
CONFIGURE_ARGS+=	--with-tss-user=${REAL_ROOT_USER}
CONFIGURE_ARGS+=	--with-tss-group=${REAL_ROOT_GROUP}
# Avoid `error: stack protector not protecting local variables: variable length buffer [-Werror=stack-protector]` errors
CONFIGURE_ARGS+=	--disable-hardening

REPLACE_BASH+=		samples/*

EGDIR=		${PREFIX}/share/examples/swtpm
CONF_FILES+=	${EGDIR}/swtpm-localca.conf \
		${PKG_SYSCONFDIR}/swtpm-localca.conf
CONF_FILES+=	${EGDIR}/swtpm-localca.options \
		${PKG_SYSCONFDIR}/swtpm-localca.options
CONF_FILES+=	${EGDIR}/swtpm_setup.conf \
		${PKG_SYSCONFDIR}/swtpm_setup.conf

OWN_DIRS_PERMS+=	${VARBASE}/lib/swtpm-localca \
			${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755

.include "../../security/gnutls/buildlink3.mk"
.include "../../security/libtasn1/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../sysutils/libtpms/buildlink3.mk"
.include "../../textproc/json-glib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"