summaryrefslogtreecommitdiffstats
path: root/meta-app-framework/recipes-core/base-files/base-files_%.bbappend
blob: 271fe77a67b7776edf9972cbdf5a6ec3c4279cde (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
RDEPENDS_${PN}_append_smack = " smack-userspace"
PACKAGE_WRITE_DEPS_append_smack = " smack-userspace-native"

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
}