summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2013-02-13 23:56:38 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2013-02-14 17:35:37 +0100
commitf113f5401bc264ef2a198ce56215a3d6e70ad6e7 (patch)
treeb32fc9b8e044b8cdb82764159230cccffae9de2c /rules
parent7958a6be5cbac7ab779e6b6693ac316d4800d312 (diff)
downloadptxdist-f113f5401bc264ef2a198ce56215a3d6e70ad6e7.tar.gz
ptxdist-f113f5401bc264ef2a198ce56215a3d6e70ad6e7.tar.xz
libsemanage: add support for python wrapper
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'rules')
-rw-r--r--rules/libsemanage.in13
-rw-r--r--rules/libsemanage.make20
2 files changed, 29 insertions, 4 deletions
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)