Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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:=libsemanage
  7. PKG_VERSION:=3.9
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
  11. PKG_HASH:=ec05850aef48bfb8e02135a7f4f3f7edba3670f63d5e67f2708d4bd80b9a4634
  12. PKG_MAINTAINER:=Thomas Petazzoni <[email protected]>
  13. PKG_LICENSE:=LGPL-2.1
  14. PKG_LICENSE_FILES:=COPYING
  15. PKG_CPE_ID:=cpe:/a:selinuxproject:libsemanage
  16. HOST_BUILD_DEPENDS:=audit/host libselinux/host bzip2/host
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/host-build.mk
  19. PKG_INSTALL:=1
  20. define Package/libsemanage
  21. SECTION:=libs
  22. DEPENDS:=+libaudit +libselinux +libbz2
  23. CATEGORY:=Libraries
  24. TITLE:=SELinux policy management library
  25. URL:=http://selinuxproject.org/page/Main_Page
  26. endef
  27. define Package/libsemanage/description
  28. libsemanage is the policy management library. It uses
  29. libsepol for binary policy manipulation and libselinux for
  30. interacting with the SELinux system. It also exec's helper
  31. programs for loading policy and for checking whether the
  32. file_contexts configuration is valid (load_policy and
  33. setfiles from policycoreutils) presently, although this may
  34. change at least for the bootstrapping case (for rpm).
  35. endef #'
  36. HOST_MAKE_FLAGS += \
  37. DESTDIR=$(STAGING_DIR_HOSTPKG) \
  38. PREFIX=""
  39. define Build/Configure
  40. endef
  41. define Build/InstallDev
  42. $(INSTALL_DIR) $(1)/usr/include
  43. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  44. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  45. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsemanage.pc $(1)/usr/lib/pkgconfig/
  46. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libsemanage.pc
  47. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libsemanage.pc
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  50. endef
  51. define Package/libsemanage/install
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsemanage.so.* $(1)/usr/lib/
  54. endef
  55. $(eval $(call HostBuild))
  56. $(eval $(call BuildPackage,libsemanage))