[OpenWrt-Devel] [PATCH packages 07/11] utils/policycoreutils: new package
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Fri Nov 22 04:55:52 EST 2019
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
utils/policycoreutils/Makefile | 60 ++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 utils/policycoreutils/Makefile
diff --git a/utils/policycoreutils/Makefile b/utils/policycoreutils/Makefile
new file mode 100644
index 000000000..ce3f68692
--- /dev/null
+++ b/utils/policycoreutils/Makefile
@@ -0,0 +1,60 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=policycoreutils
+PKG_VERSION:=2.9
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20190315
+PKG_HASH:=c53c344f28007b3c0742bd958751e9b5d2385898adeb8aec6281ae57342f0f7b
+PKG_INSTALL:=1
+HOST_BUILD_DEPENDS:=libsemanage/host
+
+PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni at bootlin.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/policycoreutils
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:= +libsemanage +libcap-ng
+ TITLE:=SELinux policy utilities
+ URL:=http://selinuxproject.org/page/Main_Page
+endef
+
+define Package/policycoreutils/description
+ Policycoreutils is a collection of policy utilities
+ (originally the "core" set of utilities needed to use
+ SELinux, although it has grown a bit over time), which have
+ different dependencies. sestatus, secon, run_init, and
+ newrole only use libselinux. load_policy and setfiles only
+ use libselinux and libsepol. semodule and semanage use
+ libsemanage (and thus bring in dependencies on libsepol and
+ libselinux as well). setsebool uses libselinux to make
+ non-persistent boolean changes (via the kernel interface)
+ and uses libsemanage to make persistent boolean changes.
+endef
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_MAKE_FLAGS += \
+ PREFIX=$(STAGING_DIR_HOSTPKG) \
+ SBINDIR=$(STAGING_DIR_HOSTPKG)/sbin \
+ ETCDIR=$(STAGING_DIR_HOSTPKG)/etc
+
+define Package/policycoreutils/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/sbin
+ $(CP) $(PKG_INSTALL_DIR)/sbin/* $(1)/sbin/
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,policycoreutils))
--
2.23.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list