LIBCAP_DEPENDENCIES = host-libcap
LIBCAP_INSTALL_STAGING = YES
+ifeq ($(BR2_PACKAGE_ATTR),y)
+ LIBCAP_DEPENDENCIES += attr
+ LIBCAP_HAVE_LIBATTR = yes
+else
+ LIBCAP_HAVE_LIBATTR = no
+endif
+
define LIBCAP_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
- LIBATTR=no BUILD_CC="$(HOSTCC)" BUILD_CFLAGS="$(HOST_CFLAGS)"
+ LIBATTR=$(LIBCAP_HAVE_LIBATTR) BUILD_CC="$(HOSTCC)" \
+ BUILD_CFLAGS="$(HOST_CFLAGS)"
endef
define LIBCAP_INSTALL_STAGING_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(STAGING_DIR) \
- prefix=/usr lib=lib install
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=$(LIBCAP_HAVE_LIBATTR) \
+ DESTDIR=$(STAGING_DIR) prefix=/usr lib=lib install
endef
define LIBCAP_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(TARGET_DIR) \
- prefix=/usr lib=lib install
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=$(LIBCAP_HAVE_LIBATTR) \
+ DESTDIR=$(TARGET_DIR) prefix=/usr lib=lib install
endef
# progs use fork()