aboutsummaryrefslogtreecommitdiffstats
path: root/classes/selinux.bbclass
blob: fb0df278e096370515c3cd3c1a9dc0b4f4802743 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
def target_selinux(d, truevar = 'selinux', falsevar = ''):
    if not bb.utils.contains("DISTRO_FEATURES", "selinux", True, False, d):
        return falsevar

    pn = d.getVar("PN", True) 
    type = pn.replace(d.getVar("BPN", True), "") 
    if type in ("-native", "nativesdk-", "-cross", "-crosssdk"):
        return falsevar

    return truevar 

LIBSELINUX = "${@target_selinux(d, 'libselinux')}"