blob: 8440bb9e9f667c0a690436d5ceb692124b7986ba [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
Patrick Williams03907ee2022-05-01 06:28:52 -050013SRC_URI[sha256sum] = "48305e4144dcf6d10f3b25b7bccf0189fd2d1186feafd8cd68c6b17ecf0d7912"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000014
Andrew Geissler9aee5002022-03-30 16:27:02 +000015inherit autotools pkgconfig systemd useradd
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000016
17PACKAGECONFIG ??= ""
18PACKAGECONFIG[oxygen] = ",--disable-doxygen-doc, "
19PACKAGECONFIG[fapi] = "--enable-fapi,--disable-fapi,curl json-c "
20
21EXTRA_OECONF += "--enable-static --with-udevrulesdir=${nonarch_base_libdir}/udev/rules.d/"
22EXTRA_OECONF += "--runstatedir=/run"
23EXTRA_OECONF:remove = " --disable-static"
24
Andrew Geissler9aee5002022-03-30 16:27:02 +000025USERADD_PACKAGES = "${PN}"
26GROUPADD_PARAM:${PN} = "--system tss"
27USERADD_PARAM:${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000028
Patrick Williams03907ee2022-05-01 06:28:52 -050029do_configure:prepend() {
30 # do not extract the version number from git
31 sed -i -e 's/m4_esyscmd_s(\[git describe --tags --always --dirty\])/${PV}/' ${S}/configure.ac
32}
33
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"