blob: 912e939a16bed41a5797a652e30721a147200171 [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
Patrick Williams213cb262021-08-07 19:21:33 -050010DEPENDS:append = " tpm-tools-native expect-native socat-native python3-pip-native python3-cryptography-native"
Brad Bishop19323692019-04-05 15:28:33 -040011
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 \
Andrew Geisslerf1e44062021-04-15 15:52:46 -050015 file://oe_configure.patch \
Brad Bishop19323692019-04-05 15:28:33 -040016 "
17PE = "1"
18
19S = "${WORKDIR}/git"
20
Brad Bishop19323692019-04-05 15:28:33 -040021PARALLEL_MAKE = ""
Andrew Geisslerf1e44062021-04-15 15:52:46 -050022inherit autotools pkgconfig python3native
Brad Bishop19323692019-04-05 15:28:33 -040023
24TSS_USER="tss"
25TSS_GROUP="tss"
26
27PACKAGECONFIG ?= "openssl"
28PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
29PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}"
30PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
31PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls"
32PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
33PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050034PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp"
Brad Bishop19323692019-04-05 15:28:33 -040035
36EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}"
37
Brad Bishop19323692019-04-05 15:28:33 -040038USERADD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -050039GROUPADD_PARAM:${PN} = "--system ${TSS_USER}"
40USERADD_PARAM:${PN} = "--system -g ${TSS_GROUP} --home-dir \
Brad Bishop19323692019-04-05 15:28:33 -040041 --no-create-home --shell /bin/false ${BPN}"
42
Andrew Geissler9d3cc052021-03-31 13:36:22 -050043
44PACKAGES =+ "${PN}-python"
Patrick Williams213cb262021-08-07 19:21:33 -050045FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
Andrew Geissler9d3cc052021-03-31 13:36:22 -050046
Brad Bishop19323692019-04-05 15:28:33 -040047PACKAGE_BEFORE_PN = "${PN}-cuse"
Patrick Williams213cb262021-08-07 19:21:33 -050048FILES:${PN}-cuse = "${bindir}/swtpm_cuse"
Brad Bishop19323692019-04-05 15:28:33 -040049
Patrick Williams213cb262021-08-07 19:21:33 -050050INSANE_SKIP:${PN} += "dev-so"
Brad Bishop19323692019-04-05 15:28:33 -040051
Patrick Williams213cb262021-08-07 19:21:33 -050052RDEPENDS:${PN} = "libtpm expect socat bash tpm-tools python3 python3-cryptography python3-twisted"
Brad Bishop19323692019-04-05 15:28:33 -040053
54BBCLASSEXTEND = "native nativesdk"