python3-libselinux: new package

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[strip C library after adding it to openwrt repository]
Signed-off-by: W. Michael Petullo <mike@flyn.org>
This commit is contained in:
Thomas Petazzoni
2020-08-11 10:20:06 -05:00
committed by Paul Spooren
parent 02cbc208f1
commit d4a498040d
3 changed files with 115 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
diff -u --recursive libselinux-3.1-vanilla/src/Makefile libselinux-3.1/src/Makefile
--- libselinux-3.1-vanilla/src/Makefile 2020-07-10 11:17:15.000000000 -0400
+++ libselinux-3.1/src/Makefile 2020-07-12 14:33:56.337229240 -0400
@@ -131,7 +131,7 @@
all: $(LIBA) $(LIBSO) $(LIBPC)
pywrap: all selinuxswig_python_exception.i
- CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext
+ LDSHARED="$(CC) -shared" CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext
rubywrap: all $(SWIGRUBYSO)

View File

@@ -0,0 +1,26 @@
Pkg-config definitions commonly make use of ${exec_prefix} and ${prefix}
when defining libdir and includedir, respectively. OpenWrt, for example,
relies on this when it adjusts things for cross compiling.
Signed-off-by: W. Michael Petullo <mike@flyn.org>
---
src/libselinux.pc.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libselinux.pc.in b/src/libselinux.pc.in
index 7c66b1fa..d9d58125 100644
--- a/src/libselinux.pc.in
+++ b/src/libselinux.pc.in
@@ -1,7 +1,7 @@
prefix=@prefix@
exec_prefix=${prefix}
-libdir=@libdir@
-includedir=@includedir@
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
Name: libselinux
Description: SELinux utility library
--
2.26.2