blob: 747602000d30702c4048106445789501bad2f2c5 [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
6DEPENDS = "libtasn1 expect socat glib-2.0 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"
11RDEPENDS_${PN} += "tpm-tools"
12
13SRCREV = "4f4f2f0a7e3195f6df8d235d58630a08e69403d8"
14SRC_URI = "git://github.com/stefanberger/swtpm.git \
15 file://fix_lib_search_path.patch \
16 file://fix_fcntl_h.patch \
17 file://ioctl_h.patch \
18 "
19
20S = "${WORKDIR}/git"
21
22inherit autotools-brokensep pkgconfig
23PARALLEL_MAKE = ""
24
25TSS_USER="tss"
26TSS_GROUP="tss"
27
28PACKAGECONFIG ?= "openssl cuse"
29PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', 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
39# dup bootstrap
40do_configure_prepend () {
41 libtoolize --force --copy
42 autoheader
43 aclocal
44 automake --add-missing -c
45 autoconf
46}
47
48USERADD_PACKAGES = "${PN}"
49GROUPADD_PARAM_${PN} = "--system ${TSS_USER}"
50USERADD_PARAM_${PN} = "--system -g ${TSS_GROUP} --home-dir \
51 --no-create-home --shell /bin/false ${BPN}"
52
53RDEPENDS_${PN} = "libtpm expect socat bash"
54
55BBCLASSEXTEND = "native nativesdk"
56
57python() {
58 if 'cuse' in d.getVar('PACKAGECONFIG') and \
59 'filesystems-layer' not in d.getVar('BBFILE_COLLECTIONS').split():
60 raise bb.parse.SkipRecipe('Cuse enabled which requires meta-filesystems to be present.')
61}