summaryrefslogtreecommitdiffstats
path: root/meta-app-framework/recipes-core/base-files/base-files_%.bbappend
blob: 0e93b4d6529627926ae471f668d569420389c1f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
DEPENDS_append_smack = " smack-userspace-native"
RDEPENDS_${PN}_append_smack = " smack-userspace"

do_install_append() {
    install -d ${D}/${sysconfdir}/skel/app-data
    install -d ${D}/${sysconfdir}/skel/.config
    install -m 0755 -d ${D}/var
    if [ -d ${D}/usr/local ]; then
        mv ${D}/usr/local ${D}/var
    else
        install -m 0755 -d ${D}/var/local
    fi
    ln -s ../../var/local ${D}/usr/local
}

do_install_append_smack () {
    install -d ${D}/${sysconfdir}/smack/accesses.d
    cat > ${D}/${sysconfdir}/smack/accesses.d/default-access-domains-no-user <<EOF
System User::App-Shared rwxat
System User::Home       rwxat
EOF
    chmod 0644 ${D}/${sysconfdir}/smack/accesses.d/default-access-domains-no-user
}

pkg_postinst_${PN}_append_smack() {
    chsmack -r -a 'User::Home' -t -D $D/${sysconfdir}/skel
    chsmack -a 'User::App-Shared' -D $D/${sysconfdir}/skel/app-data
}