summaryrefslogtreecommitdiff
path: root/lang/python/python-selinux
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2023-06-08 15:34:09 +0800
committerJeffery To <jeffery.to@gmail.com>2023-06-19 15:47:09 +0800
commita205483547ca835d98d5da1284e8a77c88eb5f97 (patch)
tree730537d3a21179758452e71e9870ea744c1c4e0d /lang/python/python-selinux
parent6938f58a4528c6b3d314808fd2ec6da2a2dff77c (diff)
python3-libselinux: Update to 3.5, rename source/target package
* Rename: * Source package from python3-libselinux to python-selinux * Target package from python3-libselinux to python3-selinux * Update dependents with new target package name * Remove patches: * 010-setup-py-custom-cc.patch: LDSHARED is already set as part of $(PYTHON3_VARS) * 020-Make-use-of-variables-when-defining-libdir-and-inclu.patch: This package doesn't install the libselinux.pc file * Update package title 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>
Diffstat (limited to 'lang/python/python-selinux')
-rw-r--r--lang/python/python-selinux/Makefile74
1 files changed, 74 insertions, 0 deletions
diff --git a/lang/python/python-selinux/Makefile b/lang/python/python-selinux/Makefile
new file mode 100644
index 000000000..5736ef09a
--- /dev/null
+++ b/lang/python/python-selinux/Makefile
@@ -0,0 +1,74 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-selinux
+PKG_VERSION:=3.5
+PKG_RELEASE:=1
+
+SRC_NAME:=libselinux
+PKG_SOURCE:=$(SRC_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
+PKG_HASH:=9a3a3705ac13a2ccca2de6d652b6356fead10f36fb33115c185c5ccdf29eec19
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(SRC_NAME)-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+PKG_LICENSE:=libselinux-1.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:selinuxproject:libselinux
+
+PKG_BUILD_DEPENDS:=swig/host
+PKG_BUILD_PARALLEL:=1
+PYTHON3_PKG_BUILD:=0
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-selinux
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=SELinux runtime library bindings
+ DEPENDS:=+python3-light +libselinux
+ URL:=http://selinuxproject.org/page/Main_Page
+endef
+
+define Package/python3-selinux/description
+ libselinux is the runtime SELinux library that provides
+ interfaces (e.g. library functions for the SELinux kernel
+ APIs like getcon(), other support functions like
+ getseuserbyname()) to SELinux-aware applications. libselinux
+ may use the shared libsepol to manipulate the binary policy
+ if necessary (e.g. to downgrade the policy format to an
+ older version supported by the kernel) when loading policy.
+
+ This package provides the Python bindings for libselinux.
+endef
+
+MAKE_VARS += \
+ $(PYTHON3_VARS) \
+ $(HOST_PYTHON3_PIP_VARS) \
+ PYTHON_SETUP_ARGS=--no-compile
+
+MAKE_FLAGS += \
+ SHLIBDIR=/usr/lib
+
+ifneq ($(CONFIG_USE_MUSL),)
+ MAKE_FLAGS += FTS_LDLIBS=-lfts
+ TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
+endif
+
+define Build/Compile
+ $(call Build/Compile/Default,pywrap)
+endef
+
+define Build/Install
+ $(call Build/Install/Default,install-pywrap)
+endef
+
+$(eval $(call Py3Package,python3-selinux))
+$(eval $(call BuildPackage,python3-selinux))
+$(eval $(call BuildPackage,python3-selinux-src))