blob: 3fe1393af1738573423a145d0724727cd400c316 [file] [log] [blame]
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05301SUMMARY = "SWTPM - Software TPM Emulator"
2LICENSE = "BSD-3-Clause"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8"
4SECTION = "apps"
5
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08006DEPENDS = "libtasn1 expect socat glib-2.0 net-tools-native libtpm libtpm-native"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05307
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"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053011
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012SRCREV = "94bb9f2d716d09bcc6cd2a2e033018f8592008e7"
13SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=tpm2-preview.v2 \
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053014 file://fix_fcntl_h.patch \
15 file://ioctl_h.patch \
16 "
17
18S = "${WORKDIR}/git"
19
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020inherit autotools pkgconfig
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053021PARALLEL_MAKE = ""
22
23TSS_USER="tss"
24TSS_GROUP="tss"
25
26PACKAGECONFIG ?= "openssl cuse"
27PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
28PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
29PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls"
30PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
31PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse"
32
33EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}"
34
35export SEARCH_DIR = "${STAGING_LIBDIR_NATIVE}"
36
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053037USERADD_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
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042RDEPENDS_${PN} = "libtpm expect socat bash tpm-tools"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053043
44BBCLASSEXTEND = "native nativesdk"
45
46python() {
47 if 'cuse' in d.getVar('PACKAGECONFIG') and \
48 'filesystems-layer' not in d.getVar('BBFILE_COLLECTIONS').split():
49 raise bb.parse.SkipRecipe('Cuse enabled which requires meta-filesystems to be present.')
50}