2020-09-30 10:21:19 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=selinux-policy
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
|
|
PKG_SOURCE_URL:=https://git.defensec.nl/selinux-policy.git
|
2021-03-14 11:42:29 +00:00
|
|
|
PKG_VERSION:=0.8
|
|
|
|
PKG_MIRROR_HASH:=3b58f751a21394e3aef47fd6c9fe9430fadde6427deb5c79f08478904837ec91
|
2020-10-11 02:27:28 +00:00
|
|
|
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
2020-09-30 10:21:19 +00:00
|
|
|
PKG_BUILD_DEPENDS:=secilc/host policycoreutils/host
|
|
|
|
|
|
|
|
PKG_MAINTAINER:=Dominick Grift <dominick.grift@defensec.nl>
|
|
|
|
PKG_CPE_ID:=cpe:/a:defensec:selinux-policy
|
|
|
|
PKG_LICENSE:=Unlicense
|
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/selinux-policy
|
|
|
|
SECTION:=system
|
|
|
|
CATEGORY:=Base system
|
|
|
|
TITLE:=SELinux security policy for OpenWrt
|
|
|
|
URL:=https://git.defensec.nl/?p=selinux-policy.git;a=summary
|
|
|
|
PKGARCH:=all
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/selinux-policy/description
|
|
|
|
Basic SELinux Security Policy designed specifically for
|
|
|
|
OpenWrt and written in Common Intermediate Language.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(call Build/Compile/Default,policy)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/selinux-policy/conffiles
|
|
|
|
/etc/selinux/config
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/selinux-policy/install
|
|
|
|
$(INSTALL_DIR) $(1)/etc/selinux/$(PKG_NAME)/contexts/files/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/selinux/$(PKG_NAME)/policy/
|
2020-12-12 14:45:16 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/customizable_types $(1)/etc/selinux/$(PKG_NAME)/contexts/
|
2020-09-30 10:21:19 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/file_contexts.subs_dist $(1)/etc/selinux/$(PKG_NAME)/contexts/files/
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/file_contexts $(1)/etc/selinux/$(PKG_NAME)/contexts/files/
|
|
|
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/policy.* $(1)/etc/selinux/$(PKG_NAME)/policy/
|
|
|
|
$(INSTALL_DATA) ./files/selinux-config $(1)/etc/selinux/config
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,selinux-policy))
|