2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-04-26 16:56:48 +02:00
|
|
|
#
|
|
|
|
# libcap
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-04-26 16:56:48 +02:00
|
|
|
|
2011-12-14 16:15:17 +01:00
|
|
|
LIBCAP_VERSION = 2.22
|
|
|
|
# Until kernel.org is completely back up use debian mirror
|
|
|
|
#LIBCAP_SITE = http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2
|
|
|
|
LIBCAP_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/libc/libcap2
|
|
|
|
LIBCAP_SOURCE = libcap2_$(LIBCAP_VERSION).orig.tar.gz
|
2013-01-20 10:22:34 +01:00
|
|
|
LIBCAP_LICENSE = GPLv2 or BSD-3c
|
|
|
|
LIBCAP_LICENSE_FILES = License
|
|
|
|
|
2011-04-26 16:56:48 +02:00
|
|
|
LIBCAP_DEPENDENCIES = host-libcap
|
|
|
|
LIBCAP_INSTALL_STAGING = YES
|
2010-03-02 22:47:13 +01:00
|
|
|
|
2013-03-19 01:51:48 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ATTR),y)
|
|
|
|
LIBCAP_DEPENDENCIES += attr
|
|
|
|
LIBCAP_HAVE_LIBATTR = yes
|
|
|
|
else
|
|
|
|
LIBCAP_HAVE_LIBATTR = no
|
|
|
|
endif
|
|
|
|
|
2013-03-19 16:12:36 +01:00
|
|
|
# we don't have host-attr
|
|
|
|
HOST_LIBCAP_DEPENDENCIES =
|
|
|
|
|
2013-11-01 18:47:27 +01:00
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),y)
|
|
|
|
LIBCAP_MAKE_TARGET = libcap.a
|
|
|
|
LIBCAP_MAKE_INSTALL_TARGET = install-static
|
|
|
|
else
|
|
|
|
LIBCAP_MAKE_TARGET = all
|
|
|
|
LIBCAP_MAKE_INSTALL_TARGET = install
|
|
|
|
endif
|
|
|
|
|
2010-03-02 22:47:13 +01:00
|
|
|
define LIBCAP_BUILD_CMDS
|
2013-11-01 18:47:27 +01:00
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/libcap \
|
2013-03-19 01:51:48 +01:00
|
|
|
LIBATTR=$(LIBCAP_HAVE_LIBATTR) BUILD_CC="$(HOSTCC)" \
|
2013-11-01 18:47:27 +01:00
|
|
|
BUILD_CFLAGS="$(HOST_CFLAGS)" $(LIBCAP_MAKE_TARGET)
|
2010-03-02 22:47:13 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define LIBCAP_INSTALL_STAGING_CMDS
|
2013-11-01 18:47:27 +01:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libcap LIBATTR=$(LIBCAP_HAVE_LIBATTR) \
|
|
|
|
DESTDIR=$(STAGING_DIR) prefix=/usr lib=lib $(LIBCAP_MAKE_INSTALL_TARGET)
|
2010-03-02 22:47:13 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define LIBCAP_INSTALL_TARGET_CMDS
|
2013-11-01 18:47:27 +01:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libcap LIBATTR=$(LIBCAP_HAVE_LIBATTR) \
|
|
|
|
DESTDIR=$(TARGET_DIR) prefix=/usr lib=lib $(LIBCAP_MAKE_INSTALL_TARGET)
|
2010-03-02 22:47:13 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_LIBCAP_BUILD_CMDS
|
2011-04-26 16:56:48 +02:00
|
|
|
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) LIBATTR=no
|
2010-03-02 22:47:13 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_LIBCAP_INSTALL_CMDS
|
2011-04-26 16:56:48 +02:00
|
|
|
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(HOST_DIR) \
|
|
|
|
prefix=/usr lib=lib install
|
2010-03-02 22:47:13 +01:00
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|
2012-07-03 00:06:54 +02:00
|
|
|
$(eval $(host-generic-package))
|