Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 1 | SUMMARY = "Software stack for TPM2." |
| 2 | DESCRIPTION = "tpm2.0-tss like woah." |
| 3 | LICENSE = "BSD-2-Clause" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" |
| 5 | SECTION = "tpm" |
| 6 | |
| 7 | DEPENDS = "autoconf-archive pkgconfig" |
| 8 | |
| 9 | SRCREV = "b1d9ece8c6bea2e3043943b2edfaebcdca330c38" |
| 10 | |
| 11 | SRC_URI = " \ |
| 12 | git://github.com/tpm2-software/tpm2-tss.git;branch=1.x \ |
| 13 | file://ax_pthread.m4 \ |
| 14 | " |
| 15 | |
| 16 | inherit autotools pkgconfig systemd |
| 17 | |
| 18 | S = "${WORKDIR}/git" |
| 19 | |
| 20 | do_configure_prepend () { |
| 21 | mkdir -p ${S}/m4 |
| 22 | cp ${WORKDIR}/ax_pthread.m4 ${S}/m4 |
| 23 | # execute the bootstrap script |
| 24 | currentdir=$(pwd) |
| 25 | cd ${S} |
| 26 | ACLOCAL="aclocal --system-acdir=${STAGING_DATADIR}/aclocal" ./bootstrap |
| 27 | cd $currentdir |
| 28 | } |
| 29 | |
| 30 | INHERIT += "extrausers" |
| 31 | EXTRA_USERS_PARAMS = "\ |
| 32 | useradd -p '' tss; \ |
| 33 | groupadd tss; \ |
| 34 | " |
| 35 | |
| 36 | SYSTEMD_PACKAGES = "resourcemgr" |
| 37 | SYSTEMD_SERVICE_resourcemgr = "resourcemgr.service" |
| 38 | SYSTEMD_AUTO_ENABLE_resourcemgr = "enable" |
| 39 | |
| 40 | do_patch[postfuncs] += "${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','fix_systemd_unit','', d)}" |
| 41 | fix_systemd_unit () { |
| 42 | sed -i -e 's;^ExecStart=.*/resourcemgr;ExecStart=${sbindir}/resourcemgr;' ${S}/contrib/resourcemgr.service |
| 43 | } |
| 44 | |
| 45 | do_install_append() { |
| 46 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 47 | install -d ${D}${systemd_system_unitdir} |
| 48 | install -m0644 ${S}/contrib/resourcemgr.service ${D}${systemd_system_unitdir}/resourcemgr.service |
| 49 | fi |
| 50 | } |
| 51 | |
| 52 | PROVIDES = "${PACKAGES}" |
| 53 | PACKAGES = " \ |
| 54 | ${PN}-dbg \ |
| 55 | ${PN}-doc \ |
| 56 | libtss2 \ |
| 57 | libtss2-dev \ |
| 58 | libtss2-staticdev \ |
| 59 | libtctidevice \ |
| 60 | libtctidevice-dev \ |
| 61 | libtctidevice-staticdev \ |
| 62 | libtctisocket \ |
| 63 | libtctisocket-dev \ |
| 64 | libtctisocket-staticdev \ |
| 65 | resourcemgr \ |
| 66 | " |
| 67 | |
| 68 | FILES_libtss2 = " \ |
| 69 | ${libdir}/libsapi.so.0.0.0 \ |
| 70 | ${libdir}/libmarshal.so.0.0.0 \ |
| 71 | " |
| 72 | FILES_libtss2-dev = " \ |
| 73 | ${includedir}/sapi \ |
| 74 | ${includedir}/tcti/common.h \ |
| 75 | ${libdir}/libsapi.so* \ |
| 76 | ${libdir}/libmarshal.so* \ |
| 77 | ${libdir}/pkgconfig/sapi.pc \ |
| 78 | " |
| 79 | FILES_libtss2-staticdev = " \ |
| 80 | ${libdir}/libsapi.a \ |
| 81 | ${libdir}/libsapi.la \ |
| 82 | ${libdir}/libmarshal.a \ |
| 83 | ${libdir}/libmarshal.la \ |
| 84 | " |
| 85 | FILES_libtctidevice = "${libdir}/libtcti-device.so.0.0.0" |
| 86 | FILES_libtctidevice-dev = " \ |
| 87 | ${includedir}/tcti/tcti_device.h \ |
| 88 | ${libdir}/libtcti-device.so* \ |
| 89 | ${libdir}/pkgconfig/tcti-device.pc \ |
| 90 | " |
| 91 | FILES_libtctidevice-staticdev = "${libdir}/libtcti-device.*a" |
| 92 | FILES_libtctisocket = "${libdir}/libtcti-socket.so.0.0.0" |
| 93 | FILES_libtctisocket-dev = " \ |
| 94 | ${includedir}/tcti/tcti_socket.h \ |
| 95 | ${libdir}/libtcti-socket.so* \ |
| 96 | ${libdir}/pkgconfig/tcti-socket.pc \ |
| 97 | " |
| 98 | FILES_libtctisocket-staticdev = "${libdir}/libtcti-socket.*a" |
| 99 | FILES_resourcemgr = "${sbindir}/resourcemgr ${systemd_system_unitdir}/resourcemgr.service" |