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 | |
Armin Kuster | ca2f10c | 2022-01-29 15:44:29 -0800 | [diff] [blame] | 7 | DEPENDS = "autoconf-archive pkgconfig sqlite3 openssl libtss2-dev tpm2-tools libyaml p11-kit python3-setuptools-native" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 8 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 9 | SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 10 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 11 | SRC_URI[sha256sum] = "79f28899047defd6b4b72b7268dd56abf27774954022315f818c239af33e05bd" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 12 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 13 | UPSTREAM_CHECK_URI = "https://github.com/tpm2-software/${BPN}/releases" |
| 14 | |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 15 | inherit autotools-brokensep pkgconfig python3native |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 16 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 17 | EXTRA_OECONF += "--disable-ptool-checks" |
| 18 | |
| 19 | do_configure:prepend() { |
| 20 | # do not extract the version number from git |
| 21 | sed -i -e 's/m4_esyscmd_s(\[git describe --tags --always --dirty\])/${PV}/' ${S}/configure.ac |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | } |
Andrew Geissler | d1d22e6 | 2020-10-16 10:14:32 -0500 | [diff] [blame] | 23 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 24 | do_compile:append() { |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 25 | cd ${S}/tools |
| 26 | python3 setup.py build |
| 27 | } |
| 28 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 29 | do_install:append() { |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 30 | cd ${S}/tools |
| 31 | export PYTHONPATH="${D}${PYTHON_SITEPACKAGES_DIR}" |
| 32 | ${PYTHON_PN} setup.py install --root="${D}" --prefix="${prefix}" --install-lib="${PYTHON_SITEPACKAGES_DIR}" --optimize=1 --skip-build |
| 33 | |
| 34 | sed -i -e "s:${PYTHON}:${USRBINPATH}/env ${PYTHON_PN}:g" "${D}${bindir}"/tpm2_ptool |
| 35 | } |
| 36 | |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 37 | PACKAGES =+ "${PN}-tools" |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 38 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 39 | FILES:${PN}-tools = "\ |
Andrew Geissler | 015e6aa | 2021-01-08 16:10:30 -0600 | [diff] [blame] | 40 | ${bindir}/tpm2_ptool \ |
| 41 | ${libdir}/${PYTHON_DIR}/* \ |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 42 | " |
| 43 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 44 | FILES:${PN} += "\ |
William A. Kennington III | ee32beb | 2021-06-02 12:48:35 -0700 | [diff] [blame] | 45 | ${libdir}/pkcs11/* \ |
| 46 | ${datadir}/p11-kit/* \ |
| 47 | " |
| 48 | |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 49 | INSANE_SKIP:${PN} += "dev-so" |
| 50 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 51 | RDEPENDS:${PN} = "p11-kit tpm2-tools " |
| 52 | RDEPENDS:${PN}-tools = "${PYTHON_PN}-pyyaml ${PYTHON_PN}-cryptography ${PYTHON_PN}-pyasn1-modules" |