blob: 10547cfa235c59b3d786b00c20ee8d17237dc6b0 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#
2# This is free software, licensed under the GNU General Public License v2.
3# See /LICENSE for more information.
4#
5
6include $(TOPDIR)/rules.mk
7
8PKG_NAME:=secilc
9PKG_VERSION:=3.5
10PKG_RELEASE:=1
11
12PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
14PKG_HASH:=3eebc5a1f97847fa530cf90654b9f3b8f21a13c9ea3d07495325651580cd3373
15HOST_BUILD_DEPENDS:=libsepol/host
16
17PKG_MAINTAINER:=Dominick Grift <dominick.grift@defensec.nl>
18PKG_LICENSE:=BSD-2-Clause
19PKG_LICENSE_FILES:=COPYING
20
21include $(INCLUDE_DIR)/host-build.mk
22include $(INCLUDE_DIR)/nls.mk
23include $(INCLUDE_DIR)/package.mk
24
25HOST_LDFLAGS+=-Wl,-rpath=$(STAGING_DIR_HOSTPKG)/lib
26HOST_MAKE_FLAGS += \
27 DESTDIR=$(STAGING_DIR_HOSTPKG) \
28 PREFIX=
29
30define 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
36endef
37
38define 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.
44endef
45
46define Build/Compile
47 $(call Build/Compile/Default,secilc)
48endef
49
50define Host/Compile
51 $(call Host/Compile/Default,secilc)
52endef
53
54define Host/Install
55 $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
56 $(INSTALL_BIN) $(HOST_BUILD_DIR)/secilc $(STAGING_DIR_HOSTPKG)/bin
57endef
58
59define Package/secilc/install
60 $(INSTALL_DIR) $(1)/usr/bin
61 $(INSTALL_BIN) $(PKG_BUILD_DIR)/secilc $(1)/usr/bin
62endef
63
64$(eval $(call BuildPackage,secilc))
65$(eval $(call HostBuild))