From 02cbc208f11331f1381e7a8f6a711c4f7e817f56 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 31 Aug 2020 14:56:14 -0500 Subject: [PATCH] python3-libsemanage: new package Signed-off-by: Thomas Petazzoni [strip C library after adding it to openwrt repository]] Signed-off-by: W. Michael Petullo --- lang/python/python3-libsemanage/Makefile | 78 ++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 lang/python/python3-libsemanage/Makefile diff --git a/lang/python/python3-libsemanage/Makefile b/lang/python/python3-libsemanage/Makefile new file mode 100644 index 0000000000..5cb91ef767 --- /dev/null +++ b/lang/python/python3-libsemanage/Makefile @@ -0,0 +1,78 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +SRC_NAME:=libsemanage +PKG_NAME:=python3-$(SRC_NAME) +PKG_VERSION:=3.1 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/python-libsemanage/$(SRC_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(SRC_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710 +PKG_HASH:=22d6c75526e40d1781c30bcf29abf97171bdfe6780923f11c8e1c76a75a21ff8 +PKG_BUILD_DEPENDS:=swig/host + +PKG_MAINTAINER:=Thomas Petazzoni +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:selinuxproject:libsemanage +PYTHON3_PKG_BUILD:=0 +PKG_INSTALL:=1 +MAKE_PATH:=src + +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-libsemanage + TITLE:=Python bindings for the SELinux policy management library + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + DEPENDS:=+python3 +libsemanage + URL:=http://selinuxproject.org/page/Main_Page +endef + +define Package/python3-libsemanage/description + libsemanage is the policy management library. It uses + libsepol for binary policy manipulation and libselinux for + interacting with the SELinux system. It also exec's helper + programs for loading policy and for checking whether the + file_contexts configuration is valid (load_policy and + setfiles from policycoreutils) presently, although this may + change at least for the bootstrapping case (for rpm). + + This package provides the Python bindings for libsemanage. +endef #' + +MAKE_FLAGS += \ + PYTHON=$(PYTHON3) \ + PYINC="-I $(PYTHON3_INC_DIR)" \ + PYLIBS="-lpython$(PYTHON3_VERSION)" \ + $(PYTHON3_VARS) + +define Build/Compile + $(call Build/Compile/Default,swigify pywrap) +endef + +define Build/Install + $(call Build/Install/Default,install-pywrap) +endef + +define Build/Configure +endef + +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)) -- 2.30.2