blob: 35c77c806cebccbe9e3b946526ab931d49db5c9c [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
6DEPENDS = "libtasn1 expect socat glib-2.0 net-tools-native libtpm libtpm-native"
7
8# configure checks for the tools already during compilation and
9# then swtpm_setup needs them at runtime
10DEPENDS += "tpm-tools-native expect-native socat-native"
11
Brad Bishopa3b01f42019-09-13 06:30:46 -040012SRCREV = "39673a0139b0ee14a0109aba50a0635592c672c4"
Brad Bishop19323692019-04-05 15:28:33 -040013SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-${PV} \
14 file://fix_fcntl_h.patch \
15 file://ioctl_h.patch \
16 "
17PE = "1"
18
19S = "${WORKDIR}/git"
20
21inherit autotools pkgconfig
22PARALLEL_MAKE = ""
23
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
38export SEARCH_DIR = "${STAGING_LIBDIR_NATIVE}"
39
40USERADD_PACKAGES = "${PN}"
41GROUPADD_PARAM_${PN} = "--system ${TSS_USER}"
42USERADD_PARAM_${PN} = "--system -g ${TSS_GROUP} --home-dir \
43 --no-create-home --shell /bin/false ${BPN}"
44
45PACKAGE_BEFORE_PN = "${PN}-cuse"
46FILES_${PN}-cuse = "${bindir}/swtpm_cuse"
47
48INSANE_SKIP_${PN} += "dev-so"
49
50RDEPENDS_${PN} = "libtpm expect socat bash tpm-tools"
51
52BBCLASSEXTEND = "native nativesdk"