python3-libsemanage: Update to 3.5, rename source/target package

* Rename:

  * Source package from python3-libsemanage to python-semanage
  * Target package from python3-libsemanage to python3-semanage

* Update dependents with new target package name

* Update package title, license files, and dependencies

* Remove Build/InstallDev (files not used by any other package)

* Use Py3Package to build Python bytecode and source packages

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To 2023-06-08 16:45:07 +08:00
parent a205483547
commit 23ff8177f0
No known key found for this signature in database
GPG Key ID: C616D9E719E868E4
2 changed files with 21 additions and 35 deletions

View File

@ -5,38 +5,38 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
SRC_NAME:=libsemanage PKG_NAME:=python-semanage
PKG_NAME:=python3-$(SRC_NAME) PKG_VERSION:=3.5
PKG_VERSION:=3.2
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/python-libsemanage/$(SRC_NAME)-$(PKG_VERSION) SRC_NAME:=libsemanage
PKG_SOURCE:=$(SRC_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(SRC_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
PKG_HASH:=d722a55ca4fe2d4e2b30527720db657e6238b28079e69e2e4affeb8e733ee511 PKG_HASH:=f53534e50247538280ed0d76c6ce81d8fb3939bd64cadb89da10dba42e40dd9c
PKG_BUILD_DEPENDS:=swig/host PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(SRC_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com> PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:selinuxproject:libsemanage PKG_CPE_ID:=cpe:/a:selinuxproject:libsemanage
PKG_BUILD_DEPENDS:=swig/host
PKG_BUILD_PARALLEL:=1
PYTHON3_PKG_BUILD:=0 PYTHON3_PKG_BUILD:=0
PKG_INSTALL:=1
MAKE_PATH:=src
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk include ../python3-package.mk
define Package/python3-libsemanage define Package/python3-semanage
TITLE:=Python bindings for the SELinux policy management library
SUBMENU:=Python SUBMENU:=Python
SECTION:=lang SECTION:=lang
CATEGORY:=Languages CATEGORY:=Languages
DEPENDS:=+python3 +libsemanage TITLE:=SELinux policy management library bindings
DEPENDS:=+python3-light +libsemanage
URL:=http://selinuxproject.org/page/Main_Page URL:=http://selinuxproject.org/page/Main_Page
endef endef
define Package/python3-libsemanage/description define Package/python3-semanage/description
libsemanage is the policy management library. It uses libsemanage is the policy management library. It uses
libsepol for binary policy manipulation and libselinux for libsepol for binary policy manipulation and libselinux for
interacting with the SELinux system. It also exec's helper interacting with the SELinux system. It also exec's helper
@ -46,33 +46,19 @@ define Package/python3-libsemanage/description
change at least for the bootstrapping case (for rpm). change at least for the bootstrapping case (for rpm).
This package provides the Python bindings for libsemanage. This package provides the Python bindings for libsemanage.
endef #' endef
MAKE_FLAGS += \ MAKE_VARS += \
PYTHON=$(PYTHON3) \
PYINC="-I $(PYTHON3_INC_DIR)" \
PYLIBS="-lpython$(PYTHON3_VERSION)" \
$(PYTHON3_VARS) $(PYTHON3_VARS)
define Build/Compile define Build/Compile
$(call Build/Compile/Default,swigify pywrap) $(call Build/Compile/Default,pywrap)
endef endef
define Build/Install define Build/Install
$(call Build/Install/Default,install-pywrap) $(call Build/Install/Default,install-pywrap)
endef endef
define Build/Configure $(eval $(call Py3Package,python3-semanage))
endef $(eval $(call BuildPackage,python3-semanage))
$(eval $(call BuildPackage,python3-semanage-src))
define Build/InstallDev
$(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
$(CP) $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/* $(1)$(PYTHON3_PKG_DIR)
endef
define Package/python3-libsemanage/install
$(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
$(CP) $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/* $(1)$(PYTHON3_PKG_DIR)
endef
$(eval $(call BuildPackage,python3-libsemanage))

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=selinux-python PKG_NAME:=selinux-python
PKG_VERSION:=3.2 PKG_VERSION:=3.2
PKG_RELEASE:=2 PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
@ -93,7 +93,7 @@ endef
define Package/selinux-semanage define Package/selinux-semanage
$(call Package/selinux-python/Default) $(call Package/selinux-python/Default)
TITLE:=selinux-semanage TITLE:=selinux-semanage
DEPENDS+=+python3-sepolicy +python3-libsemanage +setools DEPENDS+=+python3-sepolicy +python3-semanage +setools
endef endef
define Package/selinux-semanage/description define Package/selinux-semanage/description