blob: b7ff2ad59fce8ea639ef5f50c9432cb4accf4bd5 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "SWTPM - Software TPM Emulator"
2LICENSE = "BSD-3-Clause"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8"
4SECTION = "apps"
5
Andrew Geissler9d3cc052021-03-31 13:36:22 -05006DEPENDS = "libtasn1 coreutils-native expect socat glib-2.0 net-tools-native libtpm libtpm-native"
Brad Bishop19323692019-04-05 15:28:33 -04007
8# configure checks for the tools already during compilation and
9# then swtpm_setup needs them at runtime
10DEPENDS += "tpm-tools-native expect-native socat-native"
11
Andrew Geissler9d3cc052021-03-31 13:36:22 -050012SRCREV = "e59c0c1a7b4c8d652dbb280fd6126895a7057464"
13SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.5 \
Brad Bishop19323692019-04-05 15:28:33 -040014 file://ioctl_h.patch \
15 "
16PE = "1"
17
18S = "${WORKDIR}/git"
19
Andrew Geissler9d3cc052021-03-31 13:36:22 -050020inherit autotools pkgconfig python3-dir
Brad Bishop19323692019-04-05 15:28:33 -040021PARALLEL_MAKE = ""
22
23TSS_USER="tss"
24TSS_GROUP="tss"
25
26PACKAGECONFIG ?= "openssl"
27PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
28PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}"
29PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
30PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls"
31PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
32PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050033PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp"
Brad Bishop19323692019-04-05 15:28:33 -040034
35EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}"
36
Brad Bishop19323692019-04-05 15:28:33 -040037USERADD_PACKAGES = "${PN}"
38GROUPADD_PARAM_${PN} = "--system ${TSS_USER}"
39USERADD_PARAM_${PN} = "--system -g ${TSS_GROUP} --home-dir \
40 --no-create-home --shell /bin/false ${BPN}"
41
Andrew Geissler9d3cc052021-03-31 13:36:22 -050042
43PACKAGES =+ "${PN}-python"
44FILES_${PN}-python = "${nonarch_libdir}/${PYTHON_PN}/dist-packages/* "
45
Brad Bishop19323692019-04-05 15:28:33 -040046PACKAGE_BEFORE_PN = "${PN}-cuse"
47FILES_${PN}-cuse = "${bindir}/swtpm_cuse"
48
49INSANE_SKIP_${PN} += "dev-so"
50
Andrew Geissler9d3cc052021-03-31 13:36:22 -050051RDEPENDS_${PN} = "libtpm expect socat bash tpm-tools python3 python3-cryptography python3-twisted"
Brad Bishop19323692019-04-05 15:28:33 -040052
53BBCLASSEXTEND = "native nativesdk"