Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "A PKCS#11 interface for TPM2 hardware" |
| 2 | DESCRIPTION = "PKCS #11 is a Public-Key Cryptography Standard that defines a standard method to access cryptographic services from tokens/ devices such as hardware security modules (HSM), smart cards, etc. In this project we intend to use a TPM2 device as the cryptographic token." |
| 3 | SECTION = "security/tpm" |
| 4 | LICENSE = "BSD-2-Clause" |
Andrew Geissler | 064f75b | 2020-06-27 00:14:46 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0fc19f620a102768d6dbd1e7166e78ab" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 6 | |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame^] | 7 | DEPENDS = "autoconf-archive pkgconfig dstat sqlite3 openssl libtss2-dev tpm2-tools libyaml python3-setuptools-native" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 8 | |
Andrew Geissler | 064f75b | 2020-06-27 00:14:46 -0500 | [diff] [blame] | 9 | SRC_URI = "git://github.com/tpm2-software/tpm2-pkcs11.git;branch=1.X \ |
Andrew Geissler | d1d22e6 | 2020-10-16 10:14:32 -0500 | [diff] [blame] | 10 | file://bootstrap_fixup.patch \ |
| 11 | file://0001-remove-local-binary-checkes.patch" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 12 | |
Andrew Geissler | d1d22e6 | 2020-10-16 10:14:32 -0500 | [diff] [blame] | 13 | SRCREV = "78bbf6a0237351830d0c3923b25ba0b57ae0b7e9" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 14 | |
| 15 | S = "${WORKDIR}/git" |
| 16 | |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame^] | 17 | inherit autotools-brokensep pkgconfig python3native |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 18 | |
| 19 | do_configure_prepend () { |
| 20 | ${S}/bootstrap |
| 21 | } |
Andrew Geissler | d1d22e6 | 2020-10-16 10:14:32 -0500 | [diff] [blame] | 22 | |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame^] | 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 | |
Andrew Geissler | d1d22e6 | 2020-10-16 10:14:32 -0500 | [diff] [blame] | 36 | RDEPNDS_${PN} = "tpm2-tools" |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame^] | 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 | " |