Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 1 | SUMMARY = "Software stack for TPM2." |
| 2 | DESCRIPTION = "OSS implementation of the TCG TPM2 Software Stack (TSS2) " |
| 3 | LICENSE = "BSD-2-Clause" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" |
| 5 | SECTION = "tpm" |
| 6 | |
| 7 | DEPENDS = "autoconf-archive-native libgcrypt openssl" |
| 8 | |
| 9 | SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \ |
| 10 | file://fixup_hosttools.patch \ |
| 11 | " |
| 12 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 13 | SRC_URI[sha256sum] = "48305e4144dcf6d10f3b25b7bccf0189fd2d1186feafd8cd68c6b17ecf0d7912" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 14 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 15 | inherit autotools pkgconfig systemd useradd |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 16 | |
| 17 | PACKAGECONFIG ??= "" |
| 18 | PACKAGECONFIG[oxygen] = ",--disable-doxygen-doc, " |
| 19 | PACKAGECONFIG[fapi] = "--enable-fapi,--disable-fapi,curl json-c " |
| 20 | |
| 21 | EXTRA_OECONF += "--enable-static --with-udevrulesdir=${nonarch_base_libdir}/udev/rules.d/" |
| 22 | EXTRA_OECONF += "--runstatedir=/run" |
| 23 | EXTRA_OECONF:remove = " --disable-static" |
| 24 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 25 | USERADD_PACKAGES = "${PN}" |
| 26 | GROUPADD_PARAM:${PN} = "--system tss" |
| 27 | USERADD_PARAM:${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 28 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 29 | do_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 Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 34 | do_install:append() { |
| 35 | # Remove /run as it is created on startup |
| 36 | rm -rf ${D}/run |
| 37 | } |
| 38 | |
| 39 | PROVIDES = "${PACKAGES}" |
| 40 | PACKAGES = " \ |
| 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 | |
| 58 | FILES:libtss2-tcti-device = "${libdir}/libtss2-tcti-device.so.*" |
| 59 | FILES:libtss2-tcti-device-dev = " \ |
| 60 | ${includedir}/tss2/tss2_tcti_device.h \ |
| 61 | ${libdir}/pkgconfig/tss2-tcti-device.pc \ |
| 62 | ${libdir}/libtss2-tcti-device.so" |
| 63 | FILES:libtss2-tcti-device-staticdev = "${libdir}/libtss2-tcti-device.*a" |
| 64 | |
| 65 | FILES:libtss2-tcti-mssim = "${libdir}/libtss2-tcti-mssim.so.*" |
| 66 | FILES:libtss2-tcti-mssim-dev = " \ |
| 67 | ${includedir}/tss2/tss2_tcti_mssim.h \ |
| 68 | ${libdir}/pkgconfig/tss2-tcti-mssim.pc \ |
| 69 | ${libdir}/libtss2-tcti-mssim.so" |
| 70 | FILES:libtss2-tcti-mssim-staticdev = "${libdir}/libtss2-tcti-mssim.*a" |
| 71 | |
| 72 | FILES:libtss2-mu = "${libdir}/libtss2-mu.so.*" |
| 73 | FILES:libtss2-mu-dev = " \ |
| 74 | ${includedir}/tss2/tss2_mu.h \ |
| 75 | ${libdir}/pkgconfig/tss2-mu.pc \ |
| 76 | ${libdir}/libtss2-mu.so" |
| 77 | FILES:libtss2-mu-staticdev = "${libdir}/libtss2-mu.*a" |
| 78 | |
| 79 | FILES:libtss2 = "${libdir}/libtss2*so.*" |
| 80 | FILES:libtss2-dev = " \ |
| 81 | ${includedir} \ |
| 82 | ${libdir}/pkgconfig \ |
| 83 | ${libdir}/libtss2*so" |
| 84 | FILES:libtss2-staticdev = "${libdir}/libtss*a" |
| 85 | |
| 86 | FILES:${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 | |
| 95 | RDEPENDS:libtss2 = "libgcrypt" |