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
/$(PKG_VERSION
)
14 PKG_HASH
:=2d97df3eb8466169b389c3660acbb90c54200ac96e452eca9f41a9639f4f238b
16 PKG_MAINTAINER
:=Thomas Petazzoni
<thomas.petazzoni@bootlin.com
>
17 PKG_CPE_ID
:=cpe
:/a
:selinuxproject
:libsepol
19 include $(INCLUDE_DIR
)/package.mk
20 include $(INCLUDE_DIR
)/host-build.mk
22 define Package
/libsepol
25 TITLE
:=SELinux binary policy manipulation library
26 URL
:=http
://selinuxproject.org
/page
/Main_Page
29 define Package
/libsepol
/description
30 Libsepol is the binary policy manipulation library. It doesn
't
31 depend upon or use any of the other SELinux components.
38 TITLE:=libsepol chkcon security context validation tool
39 URL:=http://selinuxproject.org/page/Main_Page
42 define Package/chkcon/description
43 chkcon - determine if a security context is valid for a given binary policy
47 PREFIX=$(STAGING_DIR_HOSTPKG) \
48 SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib
55 $(call Build/Compile/Default,all)
59 $(call Build/Install/Default,install)
62 define Build/InstallDev
63 $(INSTALL_DIR) $(1)/usr/include
64 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
65 $(INSTALL_DIR) $(1)/usr/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
67 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
68 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsepol.pc $(1)/usr/lib/pkgconfig/
69 $(SED) 's
,/usr
/include,$$$${prefix}/include,g
' $(1)/usr/lib/pkgconfig/libsepol.pc
70 $(SED) 's
,/usr
/lib
,$$$${exec_prefix}/lib
,g
' $(1)/usr/lib/pkgconfig/libsepol.pc
73 define Package/libsepol/install
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsepol.so.* $(1)/usr/lib/
78 define Package/chkcon/install
79 $(INSTALL_DIR) $(1)/usr/bin
80 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chkcon $(1)/usr/bin/
83 $(eval $(call HostBuild))
84 $(eval $(call BuildPackage,libsepol))
85 $(eval $(call BuildPackage,chkcon))