| SUMMARY = "SWTPM - OpenEmbedded wrapper scripts for native swtpm tools" |
| # The whole point of the recipe is to make files available |
| # for use after the build is done, so don't clean up... |
| RM_WORK_EXCLUDE += "${PN}" |
| # Wrap (almost) all swtpm binaries. Some get special wrappers and some |
| for i in `find ${bindir} ${base_bindir} ${sbindir} ${base_sbindir} -name 'swtpm*' -perm /+x -type f`; do |
| cat >${WORKDIR}/swtpm_setup_oe.sh <<EOF |
| # Wrapper around swtpm_setup which adds parameters required to |
| # run the setup as non-root directly from the native sysroot. |
| PATH="${bindir}:${base_bindir}:${sbindir}:${base_sbindir}:\$PATH" |
| exec swtpm_setup --config ${STAGING_DIR_NATIVE}/etc/swtpm_setup.conf "\$@" |
| cat >${WORKDIR}/${exe}_oe.sh <<EOF |
| # Wrapper around $exe which makes it easier to invoke |
| PATH="${bindir}:${base_bindir}:${sbindir}:${base_sbindir}:\$PATH" |
| chmod a+rx ${WORKDIR}/*.sh |
| addtask do_create_wrapper before do_build after do_prepare_recipe_sysroot |