blob: a5d6843b9851d5e83961ca809adb4fe52353e5b6 [file] [log] [blame]
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05301SUMMARY = "TPM2 Access Broker & Resource Manager"
2DESCRIPTION = "This is a system daemon implementing the TPM2 access \
3broker (TAB) & Resource Manager (RM) spec from the TCG. The daemon (tpm2-abrmd) \
4is implemented using Glib and the GObject system. In this documentation and \
5in the code we use `tpm2-abrmd` and `tabrmd` interchangeably. \
6"
7SECTION = "security/tpm"
8
9LICENSE = "BSD-2-Clause"
10LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da"
11
12DEPENDS += "autoconf-archive dbus glib-2.0 pkgconfig tpm2.0-tss glib-2.0-native"
13
14SRC_URI = "\
15 git://github.com/01org/tpm2-abrmd.git \
16 file://tpm2-abrmd-init.sh \
17 file://tpm2-abrmd.default \
18"
19SRCREV = "59ce1008e5fa3bd5a143437b0f7390851fd25bd8"
20
21S = "${WORKDIR}/git"
22
23inherit autotools pkgconfig systemd update-rc.d useradd
24
25SYSTEMD_PACKAGES += "${PN}"
26SYSTEMD_SERVICE_${PN} = "tpm2-abrmd.service"
27SYSTEMD_AUTO_ENABLE_${PN} = "disable"
28
29INITSCRIPT_NAME = "${PN}"
30INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ."
31
32USERADD_PACKAGES = "${PN}"
33GROUPADD_PARAM_${PN} = "tss"
34USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"
35
36PACKAGECONFIG ?="udev"
37PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd', '', d)}"
38
39PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --with-systemdsystemunitdir=no"
40PACKAGECONFIG[udev] = "--with-udevrulesdir=${sysconfdir}/udev/rules.d, --without-udevrulesdir"
41
42do_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
50FILES_${PN} += "${libdir}/systemd/system-preset"
51
52RDEPENDS_${PN} += "libgcc dbus-glib libtss2 libtctidevice libtctisocket"
53
54BBCLASSEXTEND = "native"