Browse Source

libsepol: break out chkcon utility

Signed-off-by: Daniel Golle <[email protected]>
Daniel Golle 5 years ago
parent
commit
d96d324280
1 changed files with 18 additions and 0 deletions
  1. 18 0
      package/libs/libsepol/Makefile

+ 18 - 0
package/libs/libsepol/Makefile

@@ -30,6 +30,18 @@ define Package/libsepol/description
 	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
@@ -62,5 +74,11 @@ define Package/libsepol/install
 	$(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 BuildPackage,chkcon))