2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
6 include $(TOPDIR
)/rules.mk
9 PKG_NAME
:=python3-
$(SRC_NAME
)
13 PKG_BUILD_DIR
:=$(BUILD_DIR
)/python-libselinux
/$(SRC_NAME
)-$(PKG_VERSION
)
14 PKG_SOURCE
:=$(SRC_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://github.com
/SELinuxProject
/selinux
/releases
/download
/$(PKG_VERSION
)
16 PKG_HASH
:=acfdee27633d2496508c28727c3d41d3748076f66d42fccde2e6b9f3463a7057
17 PKG_BUILD_DEPENDS
:=swig
/host
19 PKG_MAINTAINER
:=Thomas Petazzoni
<thomas.petazzoni@bootlin.com
>
20 PKG_LICENSE
:=libselinux-1.0
21 PKG_LICENSE_FILES
:=LICENSE
22 PKG_CPE_ID
:=cpe
:/a
:selinuxproject
:libselinux
27 include $(INCLUDE_DIR
)/package.mk
28 include ..
/python3-package.mk
30 define Package
/python3-libselinux
31 TITLE
:=Python bindings for the runtime SELinux library
35 DEPENDS
:=+libpcre
+musl-fts
+python3
+libselinux
36 URL
:=http
://selinuxproject.org
/page
/Main_Page
39 define Package
/python3-libselinux
/description
40 libselinux is the runtime SELinux library that provides
41 interfaces
(e.g. library functions for the SELinux kernel
42 APIs like getcon
(), other support functions like
43 getseuserbyname
()) to SELinux-aware applications. libselinux
44 may use the shared libsepol to manipulate the binary policy
45 if necessary
(e.g. to downgrade the policy format to an
46 older version supported by the kernel
) when loading policy.
48 This package provides the Python bindings for libselinux.
51 ifneq ($(CONFIG_USE_MUSL
),)
52 TARGET_CFLAGS
+= -D_LARGEFILE64_SOURCE
59 PYINC
="-I $(PYTHON3_INC_DIR)" \
60 PYLIBS
="-lpython$(PYTHON3_VERSION)" \
64 $(call Build
/Compile
/Default
,swigify pywrap
)
68 $(call Build
/Install
/Default
,install-pywrap
)
71 define Build
/InstallDev
72 $(INSTALL_DIR
) $(1)$(PYTHON3_PKG_DIR
)
73 $(CP
) $(PKG_INSTALL_DIR
)$(PYTHON3_PKG_DIR
)/* $(1)$(PYTHON3_PKG_DIR
)
76 define Package
/python3-libselinux
/install
77 $(INSTALL_DIR
) $(1)$(PYTHON3_PKG_DIR
)
78 $(CP
) $(PKG_INSTALL_DIR
)$(PYTHON3_PKG_DIR
)/* $(1)$(PYTHON3_PKG_DIR
)
81 $(eval
$(call BuildPackage
,python3-libselinux
))