@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME := libcap
PKG_VERSION := 2.25
PKG_RELEASE := 1
PKG_RELEASE := 2
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.xz
PKG_SOURCE_URL := @KERNEL/linux/libs/security/linux-privs/libcap2
@ -30,19 +30,41 @@ define Package/libcap
URL:= http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/
e n d e f
d e f i n e P a c k a g e / l i b c a p / c o n f i g
if PACKAGE_libcap
config PACKAGE_libcap-bin
bool "install libcap executables"
help
Install capsh, getcap, getpcaps, setcap into the target image.
default n
config PACKAGE_libcap-bin-capsh-shell
string "capsh shell"
depends on PACKAGE_libcap-bin
help
Set the capsh shell.
default "/bin/sh"
endif
e n d e f
MAKE_FLAGS += \
CFLAGS = " $( TARGET_CFLAGS) " \
BUILD_CC = " $( CC) " \
BUILD_CFLAGS = " $( FPIC) -I $( PKG_BUILD_DIR) /libcap/include " \
CFLAGS = " $( TARGET_CFLAGS) " \
LD = " $( TARGET_CC) " \
LDFLAGS = " $( TARGET_LDFLAGS) -shared " \
LD = " $( TARGET_CC) -Wl,-x -shared " \
LDFLAGS = " $( TARGET_LDFLAGS) " \
INDENT = "| true" \
PAM_CAP = "no" \
RAISE_SETFCAP = "no" \
DYNAMIC = "yes" \
lib = "lib"
i f n e q ( $( CONFIG_PACKAGE_libcap -bin -capsh -shell ) , )
TARGET_CFLAGS += -DSHELL= '\"$(CONFIG_PACKAGE_libcap-bin-capsh-shell)\"'
e n d i f
d e f i n e B u i l d / I n s t a l l D e v
$( INSTALL_DIR) $( 1) /usr/include/sys
$( CP) $( PKG_INSTALL_DIR) /usr/include/* $( 1) /usr/include/
@ -53,6 +75,13 @@ endef
d e f i n e P a c k a g e / l i b c a p / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/lib
$( CP) $( PKG_INSTALL_DIR) /lib/libcap.so* $( 1) /usr/lib/
i f n e q ( $( CONFIG_PACKAGE_libcap -bin ) , )
$( INSTALL_DIR) $( 1) /usr/sbin
$( CP) $( PKG_INSTALL_DIR) /sbin/capsh $( 1) /usr/sbin/
$( CP) $( PKG_INSTALL_DIR) /sbin/getcap $( 1) /usr/sbin/
$( CP) $( PKG_INSTALL_DIR) /sbin/getpcaps $( 1) /usr/sbin/
$( CP) $( PKG_INSTALL_DIR) /sbin/setcap $( 1) /usr/sbin/
e n d i f
e n d e f
$( eval $ ( call BuildPackage ,libcap ) )