blob: f3a53dd9b7778a501f76cd6e2bcdf410e7aa954f [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"
34
35EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}"
36
37export SEARCH_DIR = "${STAGING_LIBDIR_NATIVE}"
38
39USERADD_PACKAGES = "${PN}"
40GROUPADD_PARAM_${PN} = "--system ${TSS_USER}"
41USERADD_PARAM_${PN} = "--system -g ${TSS_GROUP} --home-dir \
42 --no-create-home --shell /bin/false ${BPN}"
43
44PACKAGE_BEFORE_PN = "${PN}-cuse"
45FILES_${PN}-cuse = "${bindir}/swtpm_cuse"
46
47INSANE_SKIP_${PN} += "dev-so"
48
49RDEPENDS_${PN} = "libtpm expect socat bash tpm-tools"
50
51BBCLASSEXTEND = "native nativesdk"