diff options
-rw-r--r-- | meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.4.0.bb | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.4.0.bb b/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.4.0.bb index 4865733..6beb67a 100644 --- a/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.4.0.bb +++ b/meta-tpm/recipes-tpm2/tpm2-pkcs11/tpm2-pkcs11_1.4.0.bb | |||
@@ -4,7 +4,7 @@ SECTION = "security/tpm" | |||
4 | LICENSE = "BSD-2-Clause" | 4 | LICENSE = "BSD-2-Clause" |
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0fc19f620a102768d6dbd1e7166e78ab" | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0fc19f620a102768d6dbd1e7166e78ab" |
6 | 6 | ||
7 | DEPENDS = "autoconf-archive pkgconfig dstat sqlite3 openssl libtss2-dev tpm2-tools libyaml" | 7 | DEPENDS = "autoconf-archive pkgconfig dstat sqlite3 openssl libtss2-dev tpm2-tools libyaml python3-setuptools-native" |
8 | 8 | ||
9 | SRC_URI = "git://github.com/tpm2-software/tpm2-pkcs11.git;branch=1.X \ | 9 | SRC_URI = "git://github.com/tpm2-software/tpm2-pkcs11.git;branch=1.X \ |
10 | file://bootstrap_fixup.patch \ | 10 | file://bootstrap_fixup.patch \ |
@@ -14,10 +14,31 @@ SRCREV = "78bbf6a0237351830d0c3923b25ba0b57ae0b7e9" | |||
14 | 14 | ||
15 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |
16 | 16 | ||
17 | inherit autotools-brokensep pkgconfig | 17 | inherit autotools-brokensep pkgconfig python3native |
18 | 18 | ||
19 | do_configure_prepend () { | 19 | do_configure_prepend () { |
20 | ${S}/bootstrap | 20 | ${S}/bootstrap |
21 | } | 21 | } |
22 | 22 | ||
23 | do_compile_append() { | ||
24 | cd ${S}/tools | ||
25 | python3 setup.py build | ||
26 | } | ||
27 | |||
28 | do_install_append() { | ||
29 | cd ${S}/tools | ||
30 | export PYTHONPATH="${D}${PYTHON_SITEPACKAGES_DIR}" | ||
31 | ${PYTHON_PN} setup.py install --root="${D}" --prefix="${prefix}" --install-lib="${PYTHON_SITEPACKAGES_DIR}" --optimize=1 --skip-build | ||
32 | |||
33 | sed -i -e "s:${PYTHON}:${USRBINPATH}/env ${PYTHON_PN}:g" "${D}${bindir}"/tpm2_ptool | ||
34 | } | ||
35 | |||
23 | RDEPNDS_${PN} = "tpm2-tools" | 36 | RDEPNDS_${PN} = "tpm2-tools" |
37 | |||
38 | PACKAGES =+ "${PN}-tools" | ||
39 | RDEPENDS_${PN}-tools += "${PYTHON_PN}-setuptools ${PYTHON_PN}-pyyaml ${PYTHON_PN}-cryptography ${PYTHON_PN}-pyasn1-modules" | ||
40 | |||
41 | FILES_${PN}-tools = "\ | ||
42 | ${bindir}/tpm2_ptool \ | ||
43 | ${libdir}/${PYTHON_DIR}/* \ | ||
44 | " | ||