Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "TPM2 Access Broker & Resource Manager" |
| 2 | DESCRIPTION = "This is a system daemon implementing the TPM2 access \ |
| 3 | broker (TAB) & Resource Manager (RM) spec from the TCG. The daemon (tpm2-abrmd) \ |
| 4 | is implemented using Glib and the GObject system. In this documentation and \ |
| 5 | in the code we use `tpm2-abrmd` and `tabrmd` interchangeably. \ |
| 6 | " |
| 7 | SECTION = "security/tpm" |
| 8 | |
| 9 | LICENSE = "BSD-2-Clause" |
| 10 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" |
| 11 | |
| 12 | DEPENDS = "autoconf-archive dbus glib-2.0 tpm2-tss glib-2.0-native \ |
| 13 | libtss2 libtss2-mu libtss2-tcti-device libtss2-tcti-mssim" |
| 14 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 15 | SRC_URI = "\ |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 16 | https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | file://tpm2-abrmd-init.sh \ |
| 18 | file://tpm2-abrmd.default \ |
| 19 | " |
| 20 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 21 | SRC_URI[sha256sum] = "a7844a257eaf5176f612fe9620018edc0880cca7036465ad2593f83ae0ad6673" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | |
| 23 | inherit autotools pkgconfig systemd update-rc.d useradd |
| 24 | |
| 25 | SYSTEMD_PACKAGES += "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 26 | SYSTEMD_SERVICE:${PN} = "tpm2-abrmd.service" |
| 27 | SYSTEMD_AUTO_ENABLE:${PN} = "disable" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 28 | |
| 29 | INITSCRIPT_NAME = "${PN}" |
| 30 | INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ." |
| 31 | |
| 32 | USERADD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 33 | GROUPADD_PARAM:${PN} = "tss" |
| 34 | USERADD_PARAM:${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 35 | |
| 36 | PACKAGECONFIG ?="${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd', '', d)}" |
| 37 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --with-systemdsystemunitdir=no" |
| 38 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 39 | do_install:append() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 40 | install -d "${D}${sysconfdir}/init.d" |
| 41 | install -m 0755 "${WORKDIR}/tpm2-abrmd-init.sh" "${D}${sysconfdir}/init.d/tpm2-abrmd" |
| 42 | |
| 43 | install -d "${D}${sysconfdir}/default" |
| 44 | install -m 0644 "${WORKDIR}/tpm2-abrmd.default" "${D}${sysconfdir}/default/tpm2-abrmd" |
| 45 | } |
| 46 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 47 | FILES:${PN} += "${libdir}/systemd/system-preset \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 48 | ${datadir}/dbus-1" |
| 49 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | RDEPENDS:${PN} += "tpm2-tss" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 51 | |
| 52 | BBCLASSEXTEND = "native" |