app-metrics/prometheus: add 3.1.0
[gentoo/gentoo.git] / app-crypt / tpm2-abrmd / tpm2-abrmd-3.0.0-r2.ebuild
bloba2ba6892bc2a2c080cbfb5f498b5dda2526b2ab2
1 # Copyright 1999-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
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"
12 LICENSE="BSD"
13 SLOT="0"
14 KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
15 IUSE="static-libs test"
17 RESTRICT="!test? ( test )"
19 RDEPEND="acct-group/tss
20         acct-user/tss
21         sys-apps/dbus
22         dev-libs/glib:=
23         app-crypt/tpm2-tss:="
24 DEPEND="${RDEPEND}
25         test? (
26                 app-crypt/swtpm
27                 >=app-crypt/tpm2-tss-3.0.0:=
28                 dev-util/cmocka
29         )"
30 BDEPEND="virtual/pkgconfig
31         dev-util/gdbus-codegen"
33 src_prepare() {
34         default
35         eautoreconf
38 src_configure() {
39         # tests fail with LTO enabbled. See bug 865275
40         filter-lto
41         econf \
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)"
52 src_install() {
53         default
55         find "${D}" -name '*.la' -delete || die
57         newinitd "${FILESDIR}"/${PN}.initd ${PN}
58         newconfd "${FILESDIR}"/${PN}.confd ${PN}
61 pkg_postinst() {
62         einfo "As of tpm2-abrmd 3.0.0, users must be in the tss group"
63         einfo "to access the TPM"