2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
6 include $(TOPDIR
)/rules.mk
12 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
13 PKG_SOURCE_URL
:=https
://github.com
/SELinuxProject
/selinux
/releases
/download
/3.2
14 PKG_HASH
:=dfc7f662af8000116e56a01de6a0394ed79be1b34b999e551346233c5dd19508
16 PKG_MAINTAINER
:=Thomas Petazzoni
<thomas.petazzoni@bootlin.com
>
18 include $(INCLUDE_DIR
)/package.mk
19 include $(INCLUDE_DIR
)/host-build.mk
21 define Package
/libsepol
24 TITLE
:=SELinux binary policy manipulation library
25 URL
:=http
://selinuxproject.org
/page
/Main_Page
28 define Package
/libsepol
/description
29 Libsepol is the binary policy manipulation library. It doesn
't
30 depend upon or use any of the other SELinux components.
37 TITLE:=libsepol chkcon security context validation tool
38 URL:=http://selinuxproject.org/page/Main_Page
41 define Package/chkcon/description
42 chkcon - determine if a security context is valid for a given binary policy
46 PREFIX=$(STAGING_DIR_HOSTPKG) \
47 SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib
54 $(call Build/Compile/Default,all)
58 $(call Build/Install/Default,install)
61 define Build/InstallDev
62 $(INSTALL_DIR) $(1)/usr/include
63 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
66 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
67 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsepol.pc $(1)/usr/lib/pkgconfig/
68 $(SED) 's
,/usr
/include,$$$${prefix}/include,g
' $(1)/usr/lib/pkgconfig/libsepol.pc
69 $(SED) 's
,/usr
/lib
,$$$${exec_prefix}/lib
,g
' $(1)/usr/lib/pkgconfig/libsepol.pc
72 define Package/libsepol/install
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsepol.so.* $(1)/usr/lib/
77 define Package/chkcon/install
78 $(INSTALL_DIR) $(1)/usr/bin
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chkcon $(1)/usr/bin/
82 $(eval $(call HostBuild))
83 $(eval $(call BuildPackage,libsepol))
84 $(eval $(call BuildPackage,chkcon))