5e32bc5871c8ce18caefabde69b40525862e16c0
[openwrt/staging/jow.git] / package / utils / checkpolicy / Makefile
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:=checkpolicy
9 PKG_VERSION:=3.1
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/20200710
14 PKG_HASH:=dfc7707070520c93b14fbbdfdbe081364d806bf28e3e79e10318c2594c77bbb2
15 PKG_INSTALL:=1
16 HOST_BUILD_DEPENDS:=libselinux/host
17
18 PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
19 PKG_CPE_ID:=cpe:/a:selinuxproject:checkpolicy
20 PKG_LICENSE:=GPL-2.0-or-later
21 PKG_LICENSE_FILES:=COPYING
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/checkpolicy
26 SECTION:=utils
27 CATEGORY:=Utilities
28 TITLE:=SELinux policy compiler
29 URL:=http://selinuxproject.org/page/Main_Page
30 endef
31
32 define Package/checkpolicy/description
33 checkpolicy is the SELinux policy compiler. It uses libsepol
34 to generate the binary policy. checkpolicy uses the static
35 libsepol since it deals with low level details of the policy
36 that have not been encapsulated/abstracted by a proper
37 shared library interface.
38 endef
39
40 include $(INCLUDE_DIR)/host-build.mk
41
42 HOST_MAKE_FLAGS += \
43 PREFIX=$(STAGING_DIR_HOSTPKG)
44
45 define Package/checkpolicy/install
46 $(INSTALL_DIR) $(1)/usr/bin
47 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
48 endef
49
50 $(eval $(call HostBuild))
51 $(eval $(call BuildPackage,checkpolicy))