libsepol: break out chkcon utility
[openwrt/openwrt.git] / package / libs / libsepol / Makefile
index 2a6bd46ad0a10b2cc9f7995c67216eb2ef64ef78..8ceb7164a71d4fa46f9c20901727e7f9ee23c293 100644 (file)
@@ -30,6 +30,18 @@ define Package/libsepol/description
        depend upon or use any of the other SELinux components.
 endef
 
        depend upon or use any of the other SELinux components.
 endef
 
+define Package/chkcon
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libsepol
+  TITLE:=libsepol chkcon security context validation tool
+  URL:=http://selinuxproject.org/page/Main_Page
+endef
+
+define Package/chkcon/description
+       chkcon - determine if a security context is valid for a given binary policy
+endef
+
 HOST_MAKE_FLAGS += \
        PREFIX=$(STAGING_DIR_HOSTPKG) \
        SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib
 HOST_MAKE_FLAGS += \
        PREFIX=$(STAGING_DIR_HOSTPKG) \
        SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib
@@ -62,5 +74,11 @@ define Package/libsepol/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsepol.so.* $(1)/usr/lib/
 endef
 
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsepol.so.* $(1)/usr/lib/
 endef
 
+define Package/chkcon/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chkcon $(1)/usr/bin/
+endef
+
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,libsepol))
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,libsepol))
+$(eval $(call BuildPackage,chkcon))