# Pastebin 3YwfY8mX rburton: this is my latest attempt. I have tried the same function as do_install and do_install_append (without the addtask in the other cases): inherit cmake systemd ... do_install_systemd () { install -d ${D}${systemd_unitdir}/system/ bbwarn("in install append: %s", ${SYSTEMD_SERVICE_${PN}-systemd-auto}); for service_file_name in SYSTEMD_SERVICE_${PN}-systemd-auto; do install -m 0644 ${WORKDIR}/${service_file_name} ${D}${systemd_unitdir}/system/ sed -i -e 's!@BINDIR@!${bindir}!g' ${D}${systemd_unitdir}/system/${service_file_name} done for service_file_name in SYSTEMD_SERVICE_${PN}-systemd-noauto; do install -m 0644 ${WORKDIR}/${service_file_name} ${D}${systemd_unitdir}/system/ sed -i -e 's!@BINDIR@!${bindir}!g' ${D}${systemd_unitdir}/system/${service_file_name} done addtask install_systemd after do_install before do_package