From: Jon Ringle <[email protected]>

Signed-off-by: Jon Ringle <[email protected]>
---
 rules/libcap.in   | 10 ++++++++++
 rules/libcap.make | 13 ++++++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/rules/libcap.in b/rules/libcap.in
index c820658..6fe0230 100644
--- a/rules/libcap.in
+++ b/rules/libcap.in
@@ -3,5 +3,15 @@
 config LIBCAP
        tristate
        prompt "libcap"
+       select ATTR             if LIBCAP_SETCAP
+       select ATTR_SHARED      if LIBCAP_SETCAP
        help
          A library for getting and setting POSIX.1e capabilities.
+
+if LIBCAP
+
+config LIBCAP_SETCAP
+       bool
+       prompt "Install setcap/getcap"
+
+endif
diff --git a/rules/libcap.make b/rules/libcap.make
index 666d8c2..47f28d2 100644
--- a/rules/libcap.make
+++ b/rules/libcap.make
@@ -32,11 +32,15 @@ LIBCAP_LICENSE      := BSD, GPL
 # ----------------------------------------------------------------------------
 
 LIBCAP_MAKE_OPT        := \
-       prefix= PAM_CAP=no DYNAMIC=yes LIBATTR=no lib=lib \
+       prefix= PAM_CAP=no DYNAMIC=yes \
+       LIBATTR=$(call ptx/ifdef, PTXCONF_LIBCAP_SETCAP,yes,no) \
+       lib=lib \
        CC=$(CROSS_CC) \
        BUILD_CC=$(HOSTCC)
 
-LIBCAP_INSTALL_OPT := $(LIBCAP_MAKE_OPT) install
+LIBCAP_INSTALL_OPT := $(LIBCAP_MAKE_OPT) \
+       RAISE_SETFCAP=no \
+       install
 
 # ----------------------------------------------------------------------------
 # Target-Install
@@ -54,7 +58,10 @@ $(STATEDIR)/libcap.targetinstall:
        @$(call install_copy, libcap, 0, 0, 0755, -, /sbin/getpcaps)
        @$(call install_copy, libcap, 0, 0, 0755, -, /sbin/capsh)
        @$(call install_lib,  libcap, 0, 0, 0644, libcap)
-
+ifdef PTXCONF_LIBCAP_SETCAP
+       @$(call install_copy, libcap, 0, 0, 0755, -, /sbin/setcap)
+       @$(call install_copy, libcap, 0, 0, 0755, -, /sbin/getcap)
+endif
        @$(call install_finish, libcap)
 
        @$(call touch)
-- 
1.8.5.4


-- 
ptxdist mailing list
[email protected]

Reply via email to