diff options
| -rw-r--r-- | recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb b/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb index a03559c..ca82562 100644 --- a/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb +++ b/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb | |||
| @@ -10,7 +10,7 @@ SRC_URI = " \ | |||
| 10 | file://ax_pthread.m4 \ | 10 | file://ax_pthread.m4 \ |
| 11 | file://fix_musl_select_include.patch " | 11 | file://fix_musl_select_include.patch " |
| 12 | 12 | ||
| 13 | inherit autotools pkgconfig | 13 | inherit autotools pkgconfig systemd |
| 14 | 14 | ||
| 15 | S = "${WORKDIR}/${@d.getVar('BPN',d).upper()}" | 15 | S = "${WORKDIR}/${@d.getVar('BPN',d).upper()}" |
| 16 | 16 | ||
| @@ -24,6 +24,26 @@ do_configure_prepend () { | |||
| 24 | cd $currentdir | 24 | cd $currentdir |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | INHERIT += "extrausers" | ||
| 28 | EXTRA_USERS_PARAMS = "\ | ||
| 29 | useradd -p '' tss; \ | ||
| 30 | groupadd tss; \ | ||
| 31 | " | ||
| 32 | |||
| 33 | SYSTEMD_PACKAGES += "resourcemgr" | ||
| 34 | SYSTEMD_SERVICE_resourcemgr = "resourcemgr.service" | ||
| 35 | SYSTEMD_AUTO_ENABLE_resourcemgr = "enable" | ||
| 36 | |||
| 37 | do_patch[postfuncs] += "fix_systemd_unit" | ||
| 38 | fix_systemd_unit () { | ||
| 39 | sed -i -e 's;^ExecStart=.*/resourcemgr;ExecStart=${sbindir}/resourcemgr;' ${S}/contrib/resourcemgr.service | ||
| 40 | } | ||
| 41 | |||
| 42 | do_install_append() { | ||
| 43 | install -d ${D}${systemd_system_unitdir} | ||
| 44 | install -m0644 ${S}/contrib/resourcemgr.service ${D}${systemd_system_unitdir}/resourcemgr.service | ||
| 45 | } | ||
| 46 | |||
| 27 | PROVIDES = "${PACKAGES}" | 47 | PROVIDES = "${PACKAGES}" |
| 28 | PACKAGES = " \ | 48 | PACKAGES = " \ |
| 29 | ${PN}-dbg \ | 49 | ${PN}-dbg \ |
| @@ -64,4 +84,4 @@ FILES_libtctisocket-dev = " \ | |||
| 64 | ${libdir}/pkgconfig/tcti-socket.pc \ | 84 | ${libdir}/pkgconfig/tcti-socket.pc \ |
| 65 | " | 85 | " |
| 66 | FILES_libtctisocket-staticdev = "${libdir}/libtcti-socket.*a" | 86 | FILES_libtctisocket-staticdev = "${libdir}/libtcti-socket.*a" |
| 67 | FILES_resourcemgr = "${sbindir}/resourcemgr" | 87 | FILES_resourcemgr = "${sbindir}/resourcemgr ${systemd_system_unitdir}/resourcemgr.service" |
