You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.2 KiB

  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. SRC_NAME:=libsemanage
  7. PKG_NAME:=python3-$(SRC_NAME)
  8. PKG_VERSION:=3.1
  9. PKG_RELEASE:=1
  10. PKG_BUILD_DIR:=$(BUILD_DIR)/python-libsemanage/$(SRC_NAME)-$(PKG_VERSION)
  11. PKG_SOURCE:=$(SRC_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710
  13. PKG_HASH:=22d6c75526e40d1781c30bcf29abf97171bdfe6780923f11c8e1c76a75a21ff8
  14. PKG_BUILD_DEPENDS:=swig/host
  15. PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  16. PKG_LICENSE:=LGPL-2.1-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_CPE_ID:=cpe:/a:selinuxproject:libsemanage
  19. PYTHON3_PKG_BUILD:=0
  20. PKG_INSTALL:=1
  21. MAKE_PATH:=src
  22. include $(INCLUDE_DIR)/package.mk
  23. include ../python3-package.mk
  24. define Package/python3-libsemanage
  25. TITLE:=Python bindings for the SELinux policy management library
  26. SUBMENU:=Python
  27. SECTION:=lang
  28. CATEGORY:=Languages
  29. DEPENDS:=+python3 +libsemanage
  30. URL:=http://selinuxproject.org/page/Main_Page
  31. endef
  32. define Package/python3-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. This package provides the Python bindings for libsemanage.
  41. endef #'
  42. MAKE_FLAGS += \
  43. PYTHON=$(PYTHON3) \
  44. PYINC="-I $(PYTHON3_INC_DIR)" \
  45. PYLIBS="-lpython$(PYTHON3_VERSION)" \
  46. $(PYTHON3_VARS)
  47. define Build/Compile
  48. $(call Build/Compile/Default,swigify pywrap)
  49. endef
  50. define Build/Install
  51. $(call Build/Install/Default,install-pywrap)
  52. endef
  53. define Build/Configure
  54. endef
  55. define Build/InstallDev
  56. $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
  57. $(CP) $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/* $(1)$(PYTHON3_PKG_DIR)
  58. endef
  59. define Package/python3-libsemanage/install
  60. $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
  61. $(CP) $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/* $(1)$(PYTHON3_PKG_DIR)
  62. endef
  63. $(eval $(call BuildPackage,python3-libsemanage))