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