blob: 63734b9b36899bf00ffda0b936a46317ed754c40 [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
Patrick Williams53961c22022-01-20 11:06:23 -06006# expect-native, socat-native, coreutils-native and net-tools-native are reportedly only required for the tests
7DEPENDS = "libtasn1 coreutils-native expect-native socat-native glib-2.0 net-tools-native libtpm json-glib"
Brad Bishop19323692019-04-05 15:28:33 -04008
Patrick Williams53961c22022-01-20 11:06:23 -06009SRCREV = "98187d24fe14851653a7c46eb16e9c5f0b9beaa1"
10SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.6;protocol=https \
Brad Bishop19323692019-04-05 15:28:33 -040011 file://ioctl_h.patch \
Andrew Geisslerf1e44062021-04-15 15:52:46 -050012 file://oe_configure.patch \
Brad Bishop19323692019-04-05 15:28:33 -040013 "
14PE = "1"
15
16S = "${WORKDIR}/git"
17
Brad Bishop19323692019-04-05 15:28:33 -040018PARALLEL_MAKE = ""
Patrick Williams53961c22022-01-20 11:06:23 -060019inherit autotools pkgconfig perlnative
Brad Bishop19323692019-04-05 15:28:33 -040020
21TSS_USER="tss"
22TSS_GROUP="tss"
23
24PACKAGECONFIG ?= "openssl"
25PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
26PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}"
27PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
Patrick Williams53961c22022-01-20 11:06:23 -060028# expect, bash, tpm2-pkcs11-tools (tpm2_ptool), tpmtool and certtool is
29# used by swtpm-create-tpmca (the last two is provided by gnutls)
30# gnutls is required by: swtpm-create-tpmca, swtpm-localca and swtpm_cert
31PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls, gnutls, expect bash tpm2-pkcs11-tools"
Brad Bishop19323692019-04-05 15:28:33 -040032PACKAGECONFIG[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
Brad Bishop19323692019-04-05 15:28:33 -040044PACKAGE_BEFORE_PN = "${PN}-cuse"
Patrick Williams213cb262021-08-07 19:21:33 -050045FILES:${PN}-cuse = "${bindir}/swtpm_cuse"
Brad Bishop19323692019-04-05 15:28:33 -040046
Patrick Williams213cb262021-08-07 19:21:33 -050047INSANE_SKIP:${PN} += "dev-so"
Brad Bishop19323692019-04-05 15:28:33 -040048
Patrick Williams53961c22022-01-20 11:06:23 -060049RDEPENDS:${PN} = "libtpm"
Brad Bishop19323692019-04-05 15:28:33 -040050
51BBCLASSEXTEND = "native nativesdk"