[Feature][ZXW-65]merged P49 base code

Change-Id: I3e09c0c3d47483bc645f02310380ecb7fc6f4041
diff --git a/cap/zx297520v3/sources/meta-selinux/classes/selinux.bbclass b/cap/zx297520v3/sources/meta-selinux/classes/selinux.bbclass
new file mode 100755
index 0000000..13256d5
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-selinux/classes/selinux.bbclass
@@ -0,0 +1,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")
+    type = pn.replace(d.getVar("BPN"), "")
+    if type in ("-native", "nativesdk-", "-cross", "-crosssdk"):
+        return falsevar
+
+    return truevar 
+
+LIBSELINUX = "${@target_selinux(d, 'libselinux')}"