1 # Copyright 1999-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools flag-o-matic systemd
8 DESCRIPTION="TPM2 Access Broker & Resource Manager"
9 HOMEPAGE="https://github.com/tpm2-software/tpm2-abrmd"
10 SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
14 KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
15 IUSE="static-libs test"
17 RESTRICT="!test? ( test )"
19 RDEPEND="acct-group/tss
27 >=app-crypt/tpm2-tss-3.0.0:=
30 BDEPEND="virtual/pkgconfig
31 dev-util/gdbus-codegen"
39 # tests fail with LTO enabbled. See bug 865275
42 $(use_enable static-libs static) \
43 $(use_enable test unit) \
44 $(use_enable test integration) \
45 --disable-defaultflags \
46 --with-dbuspolicydir="${EPREFIX}/usr/share/dbus-1/system.d" \
47 --with-systemdpresetdir="$(systemd_get_systemunitdir)/../system-preset" \
48 --with-systemdpresetdisable \
49 --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
55 find "${D}" -name '*.la' -delete || die
57 newinitd "${FILESDIR}"/${PN}.initd ${PN}
58 newconfd "${FILESDIR}"/${PN}.confd ${PN}
62 einfo "As of tpm2-abrmd 3.0.0, users must be in the tss group"
63 einfo "to access the TPM"