Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "SWTPM - Software TPM Emulator" |
| 2 | LICENSE = "BSD-3-Clause" |
| 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8" |
| 4 | SECTION = "apps" |
| 5 | |
Andrew Geissler | 9d3cc05 | 2021-03-31 13:36:22 -0500 | [diff] [blame] | 6 | DEPENDS = "libtasn1 coreutils-native expect socat glib-2.0 net-tools-native libtpm libtpm-native" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 7 | |
| 8 | # configure checks for the tools already during compilation and |
| 9 | # then swtpm_setup needs them at runtime |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame^] | 10 | DEPENDS_append = " tpm-tools-native expect-native socat-native python3-pip-native python3-cryptography-native" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 11 | |
Andrew Geissler | 9d3cc05 | 2021-03-31 13:36:22 -0500 | [diff] [blame] | 12 | SRCREV = "e59c0c1a7b4c8d652dbb280fd6126895a7057464" |
| 13 | SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.5 \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 14 | file://ioctl_h.patch \ |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame^] | 15 | file://oe_configure.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 16 | " |
| 17 | PE = "1" |
| 18 | |
| 19 | S = "${WORKDIR}/git" |
| 20 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 21 | PARALLEL_MAKE = "" |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame^] | 22 | inherit autotools pkgconfig python3native |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 23 | |
| 24 | TSS_USER="tss" |
| 25 | TSS_GROUP="tss" |
| 26 | |
| 27 | PACKAGECONFIG ?= "openssl" |
| 28 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" |
| 29 | PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}" |
| 30 | PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl" |
| 31 | PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls" |
| 32 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" |
| 33 | PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse" |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 34 | PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 35 | |
| 36 | EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}" |
| 37 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 38 | USERADD_PACKAGES = "${PN}" |
| 39 | GROUPADD_PARAM_${PN} = "--system ${TSS_USER}" |
| 40 | USERADD_PARAM_${PN} = "--system -g ${TSS_GROUP} --home-dir \ |
| 41 | --no-create-home --shell /bin/false ${BPN}" |
| 42 | |
Andrew Geissler | 9d3cc05 | 2021-03-31 13:36:22 -0500 | [diff] [blame] | 43 | |
| 44 | PACKAGES =+ "${PN}-python" |
Andrew Geissler | f1e4406 | 2021-04-15 15:52:46 -0500 | [diff] [blame^] | 45 | FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" |
Andrew Geissler | 9d3cc05 | 2021-03-31 13:36:22 -0500 | [diff] [blame] | 46 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 47 | PACKAGE_BEFORE_PN = "${PN}-cuse" |
| 48 | FILES_${PN}-cuse = "${bindir}/swtpm_cuse" |
| 49 | |
| 50 | INSANE_SKIP_${PN} += "dev-so" |
| 51 | |
Andrew Geissler | 9d3cc05 | 2021-03-31 13:36:22 -0500 | [diff] [blame] | 52 | RDEPENDS_${PN} = "libtpm expect socat bash tpm-tools python3 python3-cryptography python3-twisted" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 53 | |
| 54 | BBCLASSEXTEND = "native nativesdk" |