e9df12865317999132137f77ad9e87076aacb9dd
[openwrt/openwrt.git] / package / libs / libsemanage / 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:=libsemanage
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:=22d6c75526e40d1781c30bcf29abf97171bdfe6780923f11c8e1c76a75a21ff8
15 PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
16 PKG_LICENSE:=LGPL-2.1
17 PKG_LICENSE_FILES:=COPYING
18 PKG_CPE_ID:=cpe:/a:selinuxproject:libsemanage
19
20
21 HOST_BUILD_DEPENDS:=audit/host libselinux/host bzip2/host
22
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/host-build.mk
26
27 PKG_INSTALL:=1
28
29 define Package/libsemanage
30 SECTION:=libs
31 DEPENDS:=+libaudit +libselinux +libbz2
32 CATEGORY:=Libraries
33 TITLE:=SELinux policy management library
34 URL:=http://selinuxproject.org/page/Main_Page
35 endef
36
37 define Package/libsemanage/description
38 libsemanage is the policy management library. It uses
39 libsepol for binary policy manipulation and libselinux for
40 interacting with the SELinux system. It also exec's helper
41 programs for loading policy and for checking whether the
42 file_contexts configuration is valid (load_policy and
43 setfiles from policycoreutils) presently, although this may
44 change at least for the bootstrapping case (for rpm).
45 endef #'
46
47
48 HOST_MAKE_FLAGS += \
49 DESTDIR=$(STAGING_DIR_HOSTPKG) \
50 PREFIX=""
51
52
53 define Build/Configure
54 endef
55
56 define Build/InstallDev
57 $(INSTALL_DIR) $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
59 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
60 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsemanage.pc $(1)/usr/lib/pkgconfig/
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
63 endef
64
65 define Package/libsemanage/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsemanage.so.* $(1)/usr/lib/
68 endef
69
70 $(eval $(call HostBuild))
71 $(eval $(call BuildPackage,libsemanage))