blob: 55d83f9597ca31d54d2acbfa4cca2cc863671b76 [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
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05009SRCREV = "f2268eebb0d1adf89bad83fa4cf91e37b4e3fa53"
Andrew Geissler9aee5002022-03-30 16:27:02 +000010SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.7-next;protocol=https \
Andrew Geissler9aee5002022-03-30 16:27:02 +000011 "
12PE = "1"
13
14S = "${WORKDIR}/git"
15
16PARALLEL_MAKE = ""
17inherit autotools pkgconfig perlnative
18
19TSS_USER="tss"
20TSS_GROUP="tss"
21
Andrew Geissler78b72792022-06-14 06:47:25 -050022PACKAGECONFIG ?= "openssl gnutls"
Andrew Geissler9aee5002022-03-30 16:27:02 +000023PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
Andrew Geissler78b72792022-06-14 06:47:25 -050024PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)}"
Andrew Geissler9aee5002022-03-30 16:27:02 +000025PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}"
26PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
27# expect, bash, tpm2-pkcs11-tools (tpm2_ptool), tpmtool and certtool is
28# used by swtpm-create-tpmca (the last two is provided by gnutls)
29# gnutls is required by: swtpm-create-tpmca, swtpm-localca and swtpm_cert
Andrew Geissler78b72792022-06-14 06:47:25 -050030PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls-native gnutls, gnutls-bin expect bash tpm2-pkcs11-tools"
Andrew Geissler9aee5002022-03-30 16:27:02 +000031PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
32PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse"
33PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp"
34
35EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}"
36
37USERADD_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
42
43PACKAGE_BEFORE_PN = "${PN}-cuse"
44FILES:${PN}-cuse = "${bindir}/swtpm_cuse"
45
46INSANE_SKIP:${PN} += "dev-so"
47
48RDEPENDS:${PN} = "libtpm"
49
50BBCLASSEXTEND = "native nativesdk"