<commit_before>SUMMARY = "Fake flatpak runtime for the currently running image."
DESCRIPTION = "This package provides a systemd service that fakes flatpak \
runtime for the currently running image, using read-only bind mounts."
HOMEPAGE = "http://127.0.0.1"
SECTION = "misc"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE-BSD;md5=f9f435c1bd3a753365e799edf375fc42"

SRC_URI = " \
    file://LICENSE-BSD \
    file://flatpak-fake-runtime.service.in \
    file://metadata.in \
    file://deploy.in \
"

S = "${WORKDIR}"

SYSTEMD_SERVICE_${PN} = "flatpak-fake-runtime.service"

do_compile() {
    # there is probable a proper bitbake variable for arch...
    local _t='${TARGET_SYS}'
    local _v="1234567890abcdeffedcba09876543211234567890abcdeffedcba0987654321"

    cat ${S}/flatpak-fake-runtime.service.in | \
        sed "s#@ARCH@#${_t%%-*}#g;s#@VERSION@#0.0.1#g" \
            > ${S}/flatpak-fake-runtime.service

    cat ${S}/metadata.in | \
        sed "s#@ARCH@#${_t%%-*}#g;s#@VERSION@#0.0.1#g" \
            > ${S}/metadata

    cat ${S}/deploy.in | \
        sed "s#@ARCH@#${_t%%-*}#g;s#@VERSION@#0.0.1#g;s#@SHA1@#${_v}#g" \
            > ${S}/deploy
}

do_install () {
    install -d ${D}${sysconfdir}/systemd/system
    install -m 0644 ${S}/flatpak-fake-runtime.service \
        ${D}${sysconfdir}/systemd/system

    install -d ${D}${datadir}/flatpak-fake-runtime
    install -m 0644 ${S}/deploy   ${D}${datadir}/flatpak-fake-runtime
    install -m 0644 ${S}/metadata ${D}${datadir}/flatpak-fake-runtime
}<commit_msg>flatpak-fake-runtime: automatically start emulated flatpak runtime.<commit_after>SUMMARY = "Fake flatpak runtime for the currently running image."
DESCRIPTION = "This package provides a systemd service that fakes flatpak \
runtime for the currently running image, using read-only bind mounts."
HOMEPAGE = "http://127.0.0.1"
SECTION = "misc"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE-BSD;md5=f9f435c1bd3a753365e799edf375fc42"

inherit systemd

SRC_URI = " \
    file://LICENSE-BSD \
    file://flatpak-fake-runtime.service.in \
    file://metadata.in \
    file://deploy.in \
"

S = "${WORKDIR}"

FILES_${PN} = " \
    ${datadir}/flatpak-fake-runtime \
    ${systemd_unitdir}/system/flatpak-fake-runtime.service \
"

SYSTEMD_SERVICE_${PN} = "flatpak-fake-runtime.service"

do_compile() {
    # there is probable a proper bitbake variable for arch...
    local _t='${TARGET_SYS}'
    local _v="1234567890abcdeffedcba09876543211234567890abcdeffedcba0987654321"

    cat ${S}/flatpak-fake-runtime.service.in | \
        sed "s#@ARCH@#${_t%%-*}#g;s#@VERSION@#0.0.1#g" \
            > ${S}/flatpak-fake-runtime.service

    cat ${S}/metadata.in | \
        sed "s#@ARCH@#${_t%%-*}#g;s#@VERSION@#0.0.1#g" \
            > ${S}/metadata

    cat ${S}/deploy.in | \
        sed "s#@ARCH@#${_t%%-*}#g;s#@VERSION@#0.0.1#g;s#@SHA1@#${_v}#g" \
            > ${S}/deploy
}

do_install () {
    install -d ${D}${systemd_unitdir}/system
    install -m 0644 ${S}/flatpak-fake-runtime.service \
        ${D}${systemd_unitdir}/system

    install -d ${D}${datadir}/flatpak-fake-runtime
    install -m 0644 ${S}/deploy   ${D}${datadir}/flatpak-fake-runtime
    install -m 0644 ${S}/metadata ${D}${datadir}/flatpak-fake-runtime
}
{'fraction_non_alphanumeric': 0.18324607329842932, 'fraction_numerical': 0.05481983369263936, 'mean_word_length': 3.2346805736636246, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2767951', 'n_tokens_mistral': 1378, 'n_tokens_neox': 1259, 'n_words': 204}