1*220dafdbSAndrew GeisslerSUMMARY = "SWTPM - Software TPM Emulator"
2*220dafdbSAndrew GeisslerLICENSE = "BSD-3-Clause"
3*220dafdbSAndrew GeisslerLIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8"
4*220dafdbSAndrew GeisslerSECTION = "apps"
5*220dafdbSAndrew Geissler
6*220dafdbSAndrew Geissler# expect-native, socat-native, coreutils-native and net-tools-native are reportedly only required for the tests
7*220dafdbSAndrew GeisslerDEPENDS = "libtasn1 coreutils-native expect-native socat-native glib-2.0 net-tools-native libtpm json-glib"
8*220dafdbSAndrew Geissler
9*220dafdbSAndrew GeisslerSRCREV = "d2849a9f5ced70438d67036693438344b47b4161"
10*220dafdbSAndrew GeisslerSRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.8;protocol=https"
11*220dafdbSAndrew GeisslerPE = "1"
12*220dafdbSAndrew Geissler
13*220dafdbSAndrew GeisslerS = "${WORKDIR}/git"
14*220dafdbSAndrew Geissler
15*220dafdbSAndrew GeisslerPARALLEL_MAKE = ""
16*220dafdbSAndrew Geisslerinherit autotools pkgconfig perlnative
17*220dafdbSAndrew Geissler
18*220dafdbSAndrew GeisslerTSS_USER="tss"
19*220dafdbSAndrew GeisslerTSS_GROUP="tss"
20*220dafdbSAndrew Geissler
21*220dafdbSAndrew GeisslerPACKAGECONFIG ?= "openssl gnutls"
22*220dafdbSAndrew GeisslerPACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
23*220dafdbSAndrew GeisslerPACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)}"
24*220dafdbSAndrew GeisslerPACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}"
25*220dafdbSAndrew GeisslerPACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
26*220dafdbSAndrew Geissler# expect, bash, tpm2-pkcs11-tools (tpm2_ptool), tpmtool and certtool is
27*220dafdbSAndrew Geissler# used by swtpm-create-tpmca (the last two is provided by gnutls)
28*220dafdbSAndrew Geissler# gnutls is required by: swtpm-create-tpmca, swtpm-localca and swtpm_cert
29*220dafdbSAndrew GeisslerPACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls-native gnutls, gnutls-bin expect bash tpm2-pkcs11-tools"
30*220dafdbSAndrew GeisslerPACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
31*220dafdbSAndrew GeisslerPACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse"
32*220dafdbSAndrew GeisslerPACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp"
33*220dafdbSAndrew Geissler
34*220dafdbSAndrew GeisslerEXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}"
35*220dafdbSAndrew Geissler
36*220dafdbSAndrew GeisslerUSERADD_PACKAGES = "${PN}"
37*220dafdbSAndrew GeisslerGROUPADD_PARAM:${PN} = "--system ${TSS_USER}"
38*220dafdbSAndrew GeisslerUSERADD_PARAM:${PN} = "--system -g ${TSS_GROUP} --home-dir / \
39*220dafdbSAndrew Geissler    --no-create-home  --shell /bin/false ${BPN}"
40*220dafdbSAndrew Geissler
41*220dafdbSAndrew Geissler
42*220dafdbSAndrew GeisslerPACKAGE_BEFORE_PN = "${PN}-cuse"
43*220dafdbSAndrew GeisslerFILES:${PN}-cuse = "${bindir}/swtpm_cuse"
44*220dafdbSAndrew Geissler
45*220dafdbSAndrew GeisslerINSANE_SKIP:${PN}   += "dev-so"
46*220dafdbSAndrew Geissler
47*220dafdbSAndrew GeisslerRDEPENDS:${PN} = "libtpm"
48*220dafdbSAndrew Geissler
49*220dafdbSAndrew GeisslerBBCLASSEXTEND = "native nativesdk"
50