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 |
| 10 | DEPENDS += "tpm-tools-native expect-native socat-native" |
| 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 \ |
| 15 | " |
| 16 | PE = "1" |
| 17 | |
| 18 | S = "${WORKDIR}/git" |
| 19 | |
Andrew Geissler | 9d3cc05 | 2021-03-31 13:36:22 -0500 | [diff] [blame] | 20 | inherit autotools pkgconfig python3-dir |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 21 | PARALLEL_MAKE = "" |
| 22 | |
| 23 | TSS_USER="tss" |
| 24 | TSS_GROUP="tss" |
| 25 | |
| 26 | PACKAGECONFIG ?= "openssl" |
| 27 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" |
| 28 | PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}" |
| 29 | PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl" |
| 30 | PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls" |
| 31 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" |
| 32 | PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse" |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 33 | PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 34 | |
| 35 | EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}" |
| 36 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 37 | USERADD_PACKAGES = "${PN}" |
| 38 | GROUPADD_PARAM_${PN} = "--system ${TSS_USER}" |
| 39 | USERADD_PARAM_${PN} = "--system -g ${TSS_GROUP} --home-dir \ |
| 40 | --no-create-home --shell /bin/false ${BPN}" |
| 41 | |
Andrew Geissler | 9d3cc05 | 2021-03-31 13:36:22 -0500 | [diff] [blame] | 42 | |
| 43 | PACKAGES =+ "${PN}-python" |
| 44 | FILES_${PN}-python = "${nonarch_libdir}/${PYTHON_PN}/dist-packages/* " |
| 45 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 46 | PACKAGE_BEFORE_PN = "${PN}-cuse" |
| 47 | FILES_${PN}-cuse = "${bindir}/swtpm_cuse" |
| 48 | |
| 49 | INSANE_SKIP_${PN} += "dev-so" |
| 50 | |
Andrew Geissler | 9d3cc05 | 2021-03-31 13:36:22 -0500 | [diff] [blame] | 51 | 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] | 52 | |
| 53 | BBCLASSEXTEND = "native nativesdk" |