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 | |
| 15 | |
| 16 | SRC_URI = "\ |
| 17 | git://github.com/tpm2-software/tpm2-abrmd.git \ |
| 18 | file://tpm2-abrmd-init.sh \ |
| 19 | file://tpm2-abrmd.default \ |
| 20 | " |
| 21 | |
| 22 | SRCREV = "06d9d433ba27159687255406baa37940db15465b" |
| 23 | |
| 24 | S = "${WORKDIR}/git" |
| 25 | |
| 26 | inherit autotools pkgconfig systemd update-rc.d useradd |
| 27 | |
| 28 | SYSTEMD_PACKAGES += "${PN}" |
| 29 | SYSTEMD_SERVICE_${PN} = "tpm2-abrmd.service" |
| 30 | SYSTEMD_AUTO_ENABLE_${PN} = "disable" |
| 31 | |
| 32 | INITSCRIPT_NAME = "${PN}" |
| 33 | INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ." |
| 34 | |
| 35 | USERADD_PACKAGES = "${PN}" |
| 36 | GROUPADD_PARAM_${PN} = "tss" |
| 37 | USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss" |
| 38 | |
| 39 | PACKAGECONFIG ?="${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd', '', d)}" |
| 40 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --with-systemdsystemunitdir=no" |
| 41 | |
| 42 | do_install_append() { |
| 43 | install -d "${D}${sysconfdir}/init.d" |
| 44 | install -m 0755 "${WORKDIR}/tpm2-abrmd-init.sh" "${D}${sysconfdir}/init.d/tpm2-abrmd" |
| 45 | |
| 46 | install -d "${D}${sysconfdir}/default" |
| 47 | install -m 0644 "${WORKDIR}/tpm2-abrmd.default" "${D}${sysconfdir}/default/tpm2-abrmd" |
| 48 | } |
| 49 | |
| 50 | FILES_${PN} += "${libdir}/systemd/system-preset \ |
| 51 | ${datadir}/dbus-1" |
| 52 | |
| 53 | RDEPENDS_${PN} += "tpm2-tss" |
| 54 | |
| 55 | BBCLASSEXTEND = "native" |