aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/checkpolicy
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>2020-08-23 22:02:45 -0500
committerDaniel Golle <daniel@makrotopia.org>2020-08-31 01:15:41 +0100
commit21992303fa29115f8e3b91eb440e5eb0a51fd57b (patch)
treea55b74d8e31fb3c3fe0f4d5340bfdb0bfa708cbe /package/utils/checkpolicy
parentd28adeb37d1a92333d7fc4cae0e1e24d6b814e5d (diff)
downloadupstream-21992303fa29115f8e3b91eb440e5eb0a51fd57b.tar.gz
upstream-21992303fa29115f8e3b91eb440e5eb0a51fd57b.tar.bz2
upstream-21992303fa29115f8e3b91eb440e5eb0a51fd57b.zip
checkpolicy: new package
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> [update to 3.1, make use of Python 3, and move to openwrt.git] Signed-off-by: W. Michael Petullo <mike@flyn.org>
Diffstat (limited to 'package/utils/checkpolicy')
-rw-r--r--package/utils/checkpolicy/Makefile51
1 files changed, 51 insertions, 0 deletions
diff --git a/package/utils/checkpolicy/Makefile b/package/utils/checkpolicy/Makefile
new file mode 100644
index 0000000000..5e32bc5871
--- /dev/null
+++ b/package/utils/checkpolicy/Makefile
@@ -0,0 +1,51 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=checkpolicy
+PKG_VERSION:=3.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710
+PKG_HASH:=dfc7707070520c93b14fbbdfdbe081364d806bf28e3e79e10318c2594c77bbb2
+PKG_INSTALL:=1
+HOST_BUILD_DEPENDS:=libselinux/host
+
+PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+PKG_CPE_ID:=cpe:/a:selinuxproject:checkpolicy
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/checkpolicy
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=SELinux policy compiler
+ URL:=http://selinuxproject.org/page/Main_Page
+endef
+
+define Package/checkpolicy/description
+ checkpolicy is the SELinux policy compiler. It uses libsepol
+ to generate the binary policy. checkpolicy uses the static
+ libsepol since it deals with low level details of the policy
+ that have not been encapsulated/abstracted by a proper
+ shared library interface.
+endef
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_MAKE_FLAGS += \
+ PREFIX=$(STAGING_DIR_HOSTPKG)
+
+define Package/checkpolicy/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,checkpolicy))