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 | |
| 6 | DEPENDS = "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 |
| 10 | DEPENDS += "tpm-tools-native expect-native socat-native" |
| 11 | RDEPENDS_${PN} += "tpm-tools" |
| 12 | |
| 13 | SRCREV = "4f4f2f0a7e3195f6df8d235d58630a08e69403d8" |
| 14 | SRC_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 | |
| 20 | S = "${WORKDIR}/git" |
| 21 | |
| 22 | inherit autotools-brokensep pkgconfig |
| 23 | PARALLEL_MAKE = "" |
| 24 | |
| 25 | TSS_USER="tss" |
| 26 | TSS_GROUP="tss" |
| 27 | |
| 28 | PACKAGECONFIG ?= "openssl cuse" |
| 29 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" |
| 30 | PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl" |
| 31 | PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls" |
| 32 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" |
| 33 | PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse" |
| 34 | |
| 35 | EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}" |
| 36 | |
| 37 | export SEARCH_DIR = "${STAGING_LIBDIR_NATIVE}" |
| 38 | |
| 39 | # dup bootstrap |
| 40 | do_configure_prepend () { |
| 41 | libtoolize --force --copy |
| 42 | autoheader |
| 43 | aclocal |
| 44 | automake --add-missing -c |
| 45 | autoconf |
| 46 | } |
| 47 | |
| 48 | USERADD_PACKAGES = "${PN}" |
| 49 | GROUPADD_PARAM_${PN} = "--system ${TSS_USER}" |
| 50 | USERADD_PARAM_${PN} = "--system -g ${TSS_GROUP} --home-dir \ |
| 51 | --no-create-home --shell /bin/false ${BPN}" |
| 52 | |
| 53 | RDEPENDS_${PN} = "libtpm expect socat bash" |
| 54 | |
| 55 | BBCLASSEXTEND = "native nativesdk" |
| 56 | |
| 57 | python() { |
| 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 | } |