blob: 6386105cd3bf66c064c0b4d4958bc9c834e121ce [file] [log] [blame]
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001SUMMARY = "Software stack for TPM2."
2DESCRIPTION = "OSS implementation of the TCG TPM2 Software Stack (TSS2) "
3LICENSE = "BSD-2-Clause"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da"
5SECTION = "tpm"
6
7DEPENDS = "autoconf-archive-native libgcrypt openssl"
8
9SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \
10 file://fixup_hosttools.patch \
11 "
12
Andrew Geissler9347dd42023-03-03 12:38:41 -060013SRC_URI[sha256sum] = "532a70133910b6bd842289915b3f9423c0205c0ea009d65294ca18a74087c950"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000014
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050015UPSTREAM_CHECK_URI = "https://github.com/tpm2-software/${BPN}/releases"
16
Andrew Geissler2daf84b2023-03-31 09:57:23 -050017CVE_PRODUCT = "tpm2_software_stack"
18
Andrew Geissler9aee5002022-03-30 16:27:02 +000019inherit autotools pkgconfig systemd useradd
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000020
Andrew Geisslerdc9d6142023-05-19 09:38:37 -050021PACKAGECONFIG ??= ""
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000022PACKAGECONFIG[oxygen] = ",--disable-doxygen-doc, "
Andrew Geissler9347dd42023-03-03 12:38:41 -060023PACKAGECONFIG[fapi] = "--enable-fapi,--disable-fapi,curl json-c util-linux-libuuid "
24PACKAGECONFIG[policy] = "--enable-policy,--disable-policy,json-c util-linux-libuuid "
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000025
26EXTRA_OECONF += "--enable-static --with-udevrulesdir=${nonarch_base_libdir}/udev/rules.d/"
27EXTRA_OECONF += "--runstatedir=/run"
28EXTRA_OECONF:remove = " --disable-static"
29
Andrew Geissler9aee5002022-03-30 16:27:02 +000030USERADD_PACKAGES = "${PN}"
31GROUPADD_PARAM:${PN} = "--system tss"
32USERADD_PARAM:${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000033
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000034do_install:append() {
35 # Remove /run as it is created on startup
36 rm -rf ${D}/run
37}
38
39PROVIDES = "${PACKAGES}"
40PACKAGES = " \
41 ${PN} \
42 ${PN}-dbg \
43 ${PN}-doc \
44 libtss2-mu \
45 libtss2-mu-dev \
46 libtss2-mu-staticdev \
47 libtss2-tcti-device \
48 libtss2-tcti-device-dev \
49 libtss2-tcti-device-staticdev \
50 libtss2-tcti-mssim \
51 libtss2-tcti-mssim-dev \
52 libtss2-tcti-mssim-staticdev \
53 libtss2 \
54 libtss2-dev \
55 libtss2-staticdev \
56"
57
58FILES:libtss2-tcti-device = "${libdir}/libtss2-tcti-device.so.*"
59FILES:libtss2-tcti-device-dev = " \
60 ${includedir}/tss2/tss2_tcti_device.h \
61 ${libdir}/pkgconfig/tss2-tcti-device.pc \
62 ${libdir}/libtss2-tcti-device.so"
63FILES:libtss2-tcti-device-staticdev = "${libdir}/libtss2-tcti-device.*a"
64
65FILES:libtss2-tcti-mssim = "${libdir}/libtss2-tcti-mssim.so.*"
66FILES:libtss2-tcti-mssim-dev = " \
67 ${includedir}/tss2/tss2_tcti_mssim.h \
68 ${libdir}/pkgconfig/tss2-tcti-mssim.pc \
69 ${libdir}/libtss2-tcti-mssim.so"
70FILES:libtss2-tcti-mssim-staticdev = "${libdir}/libtss2-tcti-mssim.*a"
71
72FILES:libtss2-mu = "${libdir}/libtss2-mu.so.*"
73FILES:libtss2-mu-dev = " \
74 ${includedir}/tss2/tss2_mu.h \
75 ${libdir}/pkgconfig/tss2-mu.pc \
76 ${libdir}/libtss2-mu.so"
77FILES:libtss2-mu-staticdev = "${libdir}/libtss2-mu.*a"
78
79FILES:libtss2 = "${libdir}/libtss2*so.*"
80FILES:libtss2-dev = " \
81 ${includedir} \
82 ${libdir}/pkgconfig \
83 ${libdir}/libtss2*so"
84FILES:libtss2-staticdev = "${libdir}/libtss*a"
85
86FILES:${PN} = "\
87 ${libdir}/udev \
88 /var/lib/tpm2-tss \
89 /var/run \
90 ${nonarch_base_libdir}/udev \
91 ${sysconfdir}/tmpfiles.d \
92 ${sysconfdir}/tpm2-tss \
93 ${sysconfdir}/sysusers.d"
94
95RDEPENDS:libtss2 = "libgcrypt"