blob: 03899d8032d7141fc8307a006d15da0578d51934 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001SUMMARY = "SWTPM - Software TPM Emulator"
2LICENSE = "BSD-3-Clause"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8"
4SECTION = "apps"
5
6# 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"
8
9SRCREV = "92a7035f45d9b08aa7c6b8bd6fa4c6916ef07a9e"
10SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.7-next;protocol=https \
11 file://ioctl_h.patch \
12 "
13PE = "1"
14
15S = "${WORKDIR}/git"
16
17PARALLEL_MAKE = ""
18inherit autotools pkgconfig perlnative
19
20TSS_USER="tss"
21TSS_GROUP="tss"
22
Andrew Geissler78b72792022-06-14 06:47:25 -050023PACKAGECONFIG ?= "openssl gnutls"
Andrew Geissler9aee5002022-03-30 16:27:02 +000024PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
Andrew Geissler78b72792022-06-14 06:47:25 -050025PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)}"
Andrew Geissler9aee5002022-03-30 16:27:02 +000026PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}"
27PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
28# 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
Andrew Geissler78b72792022-06-14 06:47:25 -050031PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls-native gnutls, gnutls-bin expect bash tpm2-pkcs11-tools"
Andrew Geissler9aee5002022-03-30 16:27:02 +000032PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
33PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse"
34PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp"
35
36EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}"
37
38USERADD_PACKAGES = "${PN}"
39GROUPADD_PARAM:${PN} = "--system ${TSS_USER}"
40USERADD_PARAM:${PN} = "--system -g ${TSS_GROUP} --home-dir \
41 --no-create-home --shell /bin/false ${BPN}"
42
43
44PACKAGE_BEFORE_PN = "${PN}-cuse"
45FILES:${PN}-cuse = "${bindir}/swtpm_cuse"
46
47INSANE_SKIP:${PN} += "dev-so"
48
49RDEPENDS:${PN} = "libtpm"
50
51BBCLASSEXTEND = "native nativesdk"