c1670e56707424e76299de342c3386b70d79a849
[feed/packages.git] / lang / python / python3-libsemanage / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 SRC_NAME:=libsemanage
9 PKG_NAME:=python3-$(SRC_NAME)
10 PKG_VERSION:=3.2
11 PKG_RELEASE:=1
12
13 PKG_BUILD_DIR:=$(BUILD_DIR)/python-libsemanage/$(SRC_NAME)-$(PKG_VERSION)
14 PKG_SOURCE:=$(SRC_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710
16 PKG_HASH:=d722a55ca4fe2d4e2b30527720db657e6238b28079e69e2e4affeb8e733ee511
17 PKG_BUILD_DEPENDS:=swig/host
18
19 PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
20 PKG_LICENSE:=LGPL-2.1-or-later
21 PKG_LICENSE_FILES:=COPYING
22 PKG_CPE_ID:=cpe:/a:selinuxproject:libsemanage
23 PYTHON3_PKG_BUILD:=0
24 PKG_INSTALL:=1
25 MAKE_PATH:=src
26
27 include $(INCLUDE_DIR)/package.mk
28 include ../python3-package.mk
29
30 define Package/python3-libsemanage
31 TITLE:=Python bindings for the SELinux policy management library
32 SUBMENU:=Python
33 SECTION:=lang
34 CATEGORY:=Languages
35 DEPENDS:=+python3 +libsemanage
36 URL:=http://selinuxproject.org/page/Main_Page
37 endef
38
39 define Package/python3-libsemanage/description
40 libsemanage is the policy management library. It uses
41 libsepol for binary policy manipulation and libselinux for
42 interacting with the SELinux system. It also exec's helper
43 programs for loading policy and for checking whether the
44 file_contexts configuration is valid (load_policy and
45 setfiles from policycoreutils) presently, although this may
46 change at least for the bootstrapping case (for rpm).
47
48 This package provides the Python bindings for libsemanage.
49 endef #'
50
51 MAKE_FLAGS += \
52 PYTHON=$(PYTHON3) \
53 PYINC="-I $(PYTHON3_INC_DIR)" \
54 PYLIBS="-lpython$(PYTHON3_VERSION)" \
55 $(PYTHON3_VARS)
56
57 define Build/Compile
58 $(call Build/Compile/Default,swigify pywrap)
59 endef
60
61 define Build/Install
62 $(call Build/Install/Default,install-pywrap)
63 endef
64
65 define Build/Configure
66 endef
67
68 define Build/InstallDev
69 $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
70 $(CP) $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/* $(1)$(PYTHON3_PKG_DIR)
71 endef
72
73 define Package/python3-libsemanage/install
74 $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
75 $(CP) $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/* $(1)$(PYTHON3_PKG_DIR)
76 endef
77
78 $(eval $(call BuildPackage,python3-libsemanage))