Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 1 | SUMMARY = "SWTPM - Software TPM Emulator" |
| 2 | LICENSE = "BSD-3-Clause" |
| 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8" |
| 4 | SECTION = "apps" |
| 5 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 6 | DEPENDS = "libtasn1 expect socat glib-2.0 net-tools-native libtpm libtpm-native" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 7 | |
| 8 | # configure checks for the tools already during compilation and |
| 9 | # then swtpm_setup needs them at runtime |
| 10 | DEPENDS += "tpm-tools-native expect-native socat-native" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 11 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 12 | SRCREV = "94bb9f2d716d09bcc6cd2a2e033018f8592008e7" |
| 13 | SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=tpm2-preview.v2 \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 14 | file://fix_fcntl_h.patch \ |
| 15 | file://ioctl_h.patch \ |
| 16 | " |
| 17 | |
| 18 | S = "${WORKDIR}/git" |
| 19 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | inherit autotools pkgconfig |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 21 | PARALLEL_MAKE = "" |
| 22 | |
| 23 | TSS_USER="tss" |
| 24 | TSS_GROUP="tss" |
| 25 | |
| 26 | PACKAGECONFIG ?= "openssl cuse" |
| 27 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" |
| 28 | PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl" |
| 29 | PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls" |
| 30 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" |
| 31 | PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse" |
| 32 | |
| 33 | EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}" |
| 34 | |
| 35 | export SEARCH_DIR = "${STAGING_LIBDIR_NATIVE}" |
| 36 | |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 37 | USERADD_PACKAGES = "${PN}" |
| 38 | GROUPADD_PARAM_${PN} = "--system ${TSS_USER}" |
| 39 | USERADD_PARAM_${PN} = "--system -g ${TSS_GROUP} --home-dir \ |
| 40 | --no-create-home --shell /bin/false ${BPN}" |
| 41 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 42 | RDEPENDS_${PN} = "libtpm expect socat bash tpm-tools" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 43 | |
| 44 | BBCLASSEXTEND = "native nativesdk" |
| 45 | |
| 46 | python() { |
| 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 | } |