summaryrefslogtreecommitdiffstats
path: root/rules/libcap.make
diff options
context:
space:
mode:
Diffstat (limited to 'rules/libcap.make')
-rw-r--r--rules/libcap.make14
1 files changed, 11 insertions, 3 deletions
diff --git a/rules/libcap.make b/rules/libcap.make
index 666d8c2c0..406fa25b8 100644
--- a/rules/libcap.make
+++ b/rules/libcap.make
@@ -32,11 +32,16 @@ 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 +59,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)