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 |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -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}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 39 | GROUPADD_PARAM:${PN} = "--system ${TSS_USER}" |
| 40 | USERADD_PARAM:${PN} = "--system -g ${TSS_GROUP} --home-dir \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -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" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 48 | FILES:${PN}-cuse = "${bindir}/swtpm_cuse" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 49 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 50 | INSANE_SKIP:${PN} += "dev-so" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 51 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -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" |