1SUMMARY = "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 = "d2849a9f5ced70438d67036693438344b47b4161"
10SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.8;protocol=https"
11PE = "1"
12
13S = "${WORKDIR}/git"
14
15PARALLEL_MAKE = ""
16inherit autotools pkgconfig perlnative
17
18TSS_USER="tss"
19TSS_GROUP="tss"
20
21PACKAGECONFIG ?= "openssl gnutls"
22PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
23PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)}"
24PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}"
25PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
26# expect, bash, tpm2-pkcs11-tools (tpm2_ptool), tpmtool and certtool is
27# used by swtpm-create-tpmca (the last two is provided by gnutls)
28# gnutls is required by: swtpm-create-tpmca, swtpm-localca and swtpm_cert
29PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls-native gnutls, gnutls-bin expect bash tpm2-pkcs11-tools"
30PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
31PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse"
32PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp"
33
34EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}"
35
36USERADD_PACKAGES = "${PN}"
37GROUPADD_PARAM:${PN} = "--system ${TSS_USER}"
38USERADD_PARAM:${PN} = "--system -g ${TSS_GROUP} --home-dir / \
39    --no-create-home  --shell /bin/false ${BPN}"
40
41
42PACKAGE_BEFORE_PN = "${PN}-cuse"
43FILES:${PN}-cuse = "${bindir}/swtpm_cuse"
44
45INSANE_SKIP:${PN}   += "dev-so"
46
47RDEPENDS:${PN} = "libtpm"
48
49BBCLASSEXTEND = "native nativesdk"
50