blob: b673c2bfdbfca4c2874c4b891c011d132d4fe781 [file] [log] [blame]
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05301SUMMARY = "Software stack for TPM2."
2DESCRIPTION = "tpm2.0-tss like woah."
3LICENSE = "BSD-2-Clause"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da"
5SECTION = "tpm"
6
7DEPENDS = "autoconf-archive pkgconfig"
8
9SRCREV = "b1d9ece8c6bea2e3043943b2edfaebcdca330c38"
10
11SRC_URI = " \
12 git://github.com/tpm2-software/tpm2-tss.git;branch=1.x \
13 file://ax_pthread.m4 \
14"
15
16inherit autotools pkgconfig systemd
17
18S = "${WORKDIR}/git"
19
20do_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
30INHERIT += "extrausers"
31EXTRA_USERS_PARAMS = "\
32 useradd -p '' tss; \
33 groupadd tss; \
34 "
35
36SYSTEMD_PACKAGES = "resourcemgr"
37SYSTEMD_SERVICE_resourcemgr = "resourcemgr.service"
38SYSTEMD_AUTO_ENABLE_resourcemgr = "enable"
39
40do_patch[postfuncs] += "${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','fix_systemd_unit','', d)}"
41fix_systemd_unit () {
42 sed -i -e 's;^ExecStart=.*/resourcemgr;ExecStart=${sbindir}/resourcemgr;' ${S}/contrib/resourcemgr.service
43}
44
45do_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
52PROVIDES = "${PACKAGES}"
53PACKAGES = " \
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
68FILES_libtss2 = " \
69 ${libdir}/libsapi.so.0.0.0 \
70 ${libdir}/libmarshal.so.0.0.0 \
71"
72FILES_libtss2-dev = " \
73 ${includedir}/sapi \
74 ${includedir}/tcti/common.h \
75 ${libdir}/libsapi.so* \
76 ${libdir}/libmarshal.so* \
77 ${libdir}/pkgconfig/sapi.pc \
78"
79FILES_libtss2-staticdev = " \
80 ${libdir}/libsapi.a \
81 ${libdir}/libsapi.la \
82 ${libdir}/libmarshal.a \
83 ${libdir}/libmarshal.la \
84"
85FILES_libtctidevice = "${libdir}/libtcti-device.so.0.0.0"
86FILES_libtctidevice-dev = " \
87 ${includedir}/tcti/tcti_device.h \
88 ${libdir}/libtcti-device.so* \
89 ${libdir}/pkgconfig/tcti-device.pc \
90"
91FILES_libtctidevice-staticdev = "${libdir}/libtcti-device.*a"
92FILES_libtctisocket = "${libdir}/libtcti-socket.so.0.0.0"
93FILES_libtctisocket-dev = " \
94 ${includedir}/tcti/tcti_socket.h \
95 ${libdir}/libtcti-socket.so* \
96 ${libdir}/pkgconfig/tcti-socket.pc \
97"
98FILES_libtctisocket-staticdev = "${libdir}/libtcti-socket.*a"
99FILES_resourcemgr = "${sbindir}/resourcemgr ${systemd_system_unitdir}/resourcemgr.service"