diff options
-rw-r--r-- | patches/libsemanage-2.1.9/0003-makefile-use-python-config-instead-of-pkg-config.patch | 24 | ||||
-rw-r--r-- | patches/libsemanage-2.1.9/0004-makefile-add-a-dependency-from-pywrap-lib-to-.so.patch | 24 | ||||
-rw-r--r-- | patches/libsemanage-2.1.9/series | 4 | ||||
-rw-r--r-- | rules/libsemanage.in | 13 | ||||
-rw-r--r-- | rules/libsemanage.make | 20 |
5 files changed, 80 insertions, 5 deletions
diff --git a/patches/libsemanage-2.1.9/0003-makefile-use-python-config-instead-of-pkg-config.patch b/patches/libsemanage-2.1.9/0003-makefile-use-python-config-instead-of-pkg-config.patch new file mode 100644 index 000000000..c645195ce --- /dev/null +++ b/patches/libsemanage-2.1.9/0003-makefile-use-python-config-instead-of-pkg-config.patch @@ -0,0 +1,24 @@ +From: Marc Kleine-Budde <mkl@pengutronix.de> +Date: Wed, 13 Feb 2013 23:49:06 +0100 +Subject: [PATCH] makefile: use python-config instead of pkg-config + +...because our python has no pkg-config yet. + +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 690a816..5d0e4b7 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -12,7 +12,7 @@ LIBDIR ?= $(PREFIX)/lib + SHLIBDIR ?= $(PREFIX)/lib + INCLUDEDIR ?= $(PREFIX)/include + PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_info[0:2])') +-PYINC ?= $(shell pkg-config --cflags $(PYPREFIX)) ++PYINC ?= $(shell $(PYTHON)-config --cflags) + PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER) + RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")') + RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM') diff --git a/patches/libsemanage-2.1.9/0004-makefile-add-a-dependency-from-pywrap-lib-to-.so.patch b/patches/libsemanage-2.1.9/0004-makefile-add-a-dependency-from-pywrap-lib-to-.so.patch new file mode 100644 index 000000000..cc22a249d --- /dev/null +++ b/patches/libsemanage-2.1.9/0004-makefile-add-a-dependency-from-pywrap-lib-to-.so.patch @@ -0,0 +1,24 @@ +From: Marc Kleine-Budde <mkl@pengutronix.de> +Date: Wed, 13 Feb 2013 23:55:24 +0100 +Subject: [PATCH] makefile: add a dependency from pywrap lib to .so + +...otherwise in parallel builds the pywrap might get linked to the .a. + +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 5d0e4b7..4aa6b0c 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -81,7 +81,7 @@ $(SWIGLOBJ): $(SWIGCOUT) + $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT) + $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $< + +-$(SWIGSO): $(SWIGLOBJ) ++$(SWIGSO): $(SWIGLOBJ) $(LIBSO) + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage + + $(SWIGRUBYSO): $(SWIGRUBYLOBJ) diff --git a/patches/libsemanage-2.1.9/series b/patches/libsemanage-2.1.9/series index 1b6b4c369..53c6667ab 100644 --- a/patches/libsemanage-2.1.9/series +++ b/patches/libsemanage-2.1.9/series @@ -2,4 +2,6 @@ #tag:base --start-number 1 0001-makefile-remove-host-path-from-list-of-header-search.patch 0002-makefile-remove-host-path-from-list-of-linker-search.patch -# 73f17ef0b41fda63278004af46bb2478 - git-ptx-patches magic +0003-makefile-use-python-config-instead-of-pkg-config.patch +0004-makefile-add-a-dependency-from-pywrap-lib-to-.so.patch +# 1c717182218fb96b6110fc3700b8b470 - git-ptx-patches magic diff --git a/rules/libsemanage.in b/rules/libsemanage.in index cf1e98ad3..4b20bd4a2 100644 --- a/rules/libsemanage.in +++ b/rules/libsemanage.in @@ -1,14 +1,23 @@ ## SECTION=selinux -config LIBSEMANAGE +menuconfig LIBSEMANAGE tristate - prompt "libsemanage" + prompt "libsemanage " select BZIP2 select BZIP2_LIBBZ2 select LIBSEPOL select LIBSELINUX select USTR + select PYTHON if LIBSEMANAGE_PYTHON + select HOST_SWIG if LIBSEMANAGE_PYTHON help This package provides the shared libraries for SELinux policy management. It uses libsepol for binary policy manipulation and libselinux for interacting with the SELinux system. + +if LIBSEMANAGE + +config LIBSEMANAGE_PYTHON + bool "python wrapper" + +endif diff --git a/rules/libsemanage.make b/rules/libsemanage.make index 08c3f43fa..5eb1e5da3 100644 --- a/rules/libsemanage.make +++ b/rules/libsemanage.make @@ -30,9 +30,22 @@ LIBSEMANAGE_LICENSE := LGPLv2.1+ # ---------------------------------------------------------------------------- LIBSEMANAGE_CONF_TOOL := NO -LIBSEMANAGE_MAKE_ENV := \ +# no := due to CROSS_PYTHON +LIBSEMANAGE_MAKE_ENV = \ $(CROSS_ENV) \ - CFLAGS="-O2 -Wall -g" + CFLAGS="-O2 -Wall -g" \ + PYTHON=$(CROSS_PYTHON) + +LIBSEMANAGE_MAKE_OPT := \ + LIBDIR=$(PTXDIST_SYSROOT_TARGET)/usr/lib \ + all +LIBSEMANAGE_INSTALL_OPT := \ + install + +ifdef PTXCONF_LIBSEMANAGE_PYTHON +LIBSEMANAGE_MAKE_OPT += pywrap +LIBSEMANAGE_INSTALL_OPT += install-pywrap +endif # ---------------------------------------------------------------------------- # Target-Install @@ -50,6 +63,9 @@ $(STATEDIR)/libsemanage.targetinstall: @$(call install_lib, libsemanage, 0, 0, 0644, libsemanage) @$(call install_alternative, libsemanage, 0, 0, 0644, /etc/selinux/semanage.conf) +ifdef PTXCONF_LIBSEMANAGE_PYTHON + @$(call install_tree, libsemanage, 0, 0, -, $(PYTHON_SITEPACKAGES)) +endif @$(call install_finish, libsemanage) @$(call touch) |