blob: 32b2d8f99fb415f53e58759e842da8deccf70816 [file] [log] [blame]
#
# 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_VERSION:=0.8
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_BUILD_DEPENDS:=secilc/host policycoreutils/host
USE_SOURCE_DIR:=$(MRVLDIR)/services/selinux-policy
SVC_SOURCE_DIR:=${USE_SOURCE_DIR}
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/autotools.mk
define Package/selinux-policy-local
SECTION:=system
CATEGORY:=Base system
DEPENDS:=@SELINUX
TITLE:=SELinux security policy for OpenWrt
PKGARCH:=all
endef
define Package/selinux-policy-local/description
Basic SELinux Security Policy designed specifically for
OpenWrt and written in Common Intermediate Language.
endef
define Build/Compile
$(call Build/Compile/Default,policypackets)
endef
define Package/selinux-policy-local/conffiles
/etc/selinux/config
endef
define Package/selinux-policy-local/install
$(INSTALL_DIR) $(1)/etc/selinux/$(PKG_NAME)/contexts/files/
$(INSTALL_DIR) $(1)/etc/selinux/$(PKG_NAME)/contexts/users/
$(INSTALL_DIR) $(1)/etc/selinux/$(PKG_NAME)/policy/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/customizable_types $(1)/etc/selinux/$(PKG_NAME)/contexts/
$(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
$(INSTALL_DATA) ./files/default_contexts $(1)/etc/selinux/$(PKG_NAME)/contexts/
$(INSTALL_DATA) ./files/failsafe_context $(1)/etc/selinux/$(PKG_NAME)/contexts/
$(INSTALL_DATA) ./files/seusers $(1)/etc/selinux/$(PKG_NAME)/seusers
$(INSTALL_DATA) ./files/users/* $(1)/etc/selinux/$(PKG_NAME)/contexts/users/
endef
$(eval $(call BuildPackage,selinux-policy-local))