b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | # |
| 2 | # This is free software, licensed under the GNU General Public License v2. |
| 3 | # See /LICENSE for more information. |
| 4 | # |
| 5 | |
| 6 | include $(TOPDIR)/rules.mk |
| 7 | |
| 8 | PKG_NAME:=secilc |
| 9 | PKG_VERSION:=3.5 |
| 10 | PKG_RELEASE:=1 |
| 11 | |
| 12 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 13 | PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION) |
| 14 | PKG_HASH:=3eebc5a1f97847fa530cf90654b9f3b8f21a13c9ea3d07495325651580cd3373 |
| 15 | HOST_BUILD_DEPENDS:=libsepol/host |
| 16 | |
| 17 | PKG_MAINTAINER:=Dominick Grift <dominick.grift@defensec.nl> |
| 18 | PKG_LICENSE:=BSD-2-Clause |
| 19 | PKG_LICENSE_FILES:=COPYING |
| 20 | |
| 21 | include $(INCLUDE_DIR)/host-build.mk |
| 22 | include $(INCLUDE_DIR)/nls.mk |
| 23 | include $(INCLUDE_DIR)/package.mk |
| 24 | |
| 25 | HOST_LDFLAGS+=-Wl,-rpath=$(STAGING_DIR_HOSTPKG)/lib |
| 26 | HOST_MAKE_FLAGS += \ |
| 27 | DESTDIR=$(STAGING_DIR_HOSTPKG) \ |
| 28 | PREFIX= |
| 29 | |
| 30 | define Package/secilc |
| 31 | SECTION:=utils |
| 32 | CATEGORY:=Utilities |
| 33 | TITLE:=SELinux Common Intermediate Language (CIL) Compiler |
| 34 | URL:=http://selinuxproject.org/page/Main_Page |
| 35 | DEPENDS:=+libsepol |
| 36 | endef |
| 37 | |
| 38 | define Package/secilc/description |
| 39 | The SELinux CIL Compiler is a compiler that converts the CIL language as |
| 40 | described on the CIL design wiki into a kernel binary policy file. |
| 41 | Please see the CIL Design Wiki at: |
| 42 | http://github.com/SELinuxProject/cil/wiki/ |
| 43 | for more information about the goals and features on the CIL language. |
| 44 | endef |
| 45 | |
| 46 | define Build/Compile |
| 47 | $(call Build/Compile/Default,secilc) |
| 48 | endef |
| 49 | |
| 50 | define Host/Compile |
| 51 | $(call Host/Compile/Default,secilc) |
| 52 | endef |
| 53 | |
| 54 | define Host/Install |
| 55 | $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin |
| 56 | $(INSTALL_BIN) $(HOST_BUILD_DIR)/secilc $(STAGING_DIR_HOSTPKG)/bin |
| 57 | endef |
| 58 | |
| 59 | define Package/secilc/install |
| 60 | $(INSTALL_DIR) $(1)/usr/bin |
| 61 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/secilc $(1)/usr/bin |
| 62 | endef |
| 63 | |
| 64 | $(eval $(call BuildPackage,secilc)) |
| 65 | $(eval $(call HostBuild)) |