Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=libsepol
  7. PKG_VERSION:=3.1
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710
  11. PKG_HASH:=ae6778d01443fdd38cd30eeee846494e19f4d407b09872580372f4aa4bf8a3cc
  12. PKG_MAINTAINER:=Thomas Petazzoni <[email protected]>
  13. include $(INCLUDE_DIR)/package.mk
  14. include $(INCLUDE_DIR)/host-build.mk
  15. define Package/libsepol
  16. SECTION:=libs
  17. CATEGORY:=Libraries
  18. TITLE:=SELinux binary policy manipulation library
  19. URL:=http://selinuxproject.org/page/Main_Page
  20. endef
  21. define Package/libsepol/description
  22. Libsepol is the binary policy manipulation library. It doesn't
  23. depend upon or use any of the other SELinux components.
  24. endef
  25. HOST_MAKE_FLAGS += \
  26. PREFIX=$(STAGING_DIR_HOSTPKG) \
  27. SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib
  28. MAKE_FLAGS += \
  29. SHLIBDIR=/usr/lib \
  30. OS=Linux
  31. define Build/Compile
  32. $(call Build/Compile/Default,all)
  33. endef
  34. define Build/Install
  35. $(call Build/Install/Default,install)
  36. endef
  37. define Build/InstallDev
  38. $(INSTALL_DIR) $(1)/usr/include
  39. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  42. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  43. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsepol.pc $(1)/usr/lib/pkgconfig/
  44. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libsepol.pc
  45. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libsepol.pc
  46. endef
  47. define Package/libsepol/install
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsepol.so.* $(1)/usr/lib/
  50. endef
  51. $(eval $(call HostBuild))
  52. $(eval $(call BuildPackage,libsepol))