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
|
|
|
|
2016-03-16 21:20:08 +01:00
|
|
|
LIBCAP_VERSION = 2.25
|
2014-10-23 16:48:29 +02:00
|
|
|
LIBCAP_SITE = https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2
|
2014-10-25 20:19:53 +02:00
|
|
|
LIBCAP_SOURCE = libcap-$(LIBCAP_VERSION).tar.xz
|
2017-03-30 15:43:38 +02:00
|
|
|
LIBCAP_LICENSE = GPL-2.0 or BSD-3-Clause
|
2013-01-20 10:22:34 +01:00
|
|
|
LIBCAP_LICENSE_FILES = License
|
|
|
|
|
2016-03-16 21:20:08 +01:00
|
|
|
LIBCAP_DEPENDENCIES = host-libcap host-gperf
|
2011-04-26 16:56:48 +02:00
|
|
|
LIBCAP_INSTALL_STAGING = YES
|
2010-03-02 22:47:13 +01:00
|
|
|
|
2016-03-16 21:20:08 +01:00
|
|
|
HOST_LIBCAP_DEPENDENCIES = host-gperf
|
2013-03-19 16:12:36 +01:00
|
|
|
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2016-03-07 00:04:54 +01:00
|
|
|
LIBCAP_MAKE_TARGET = libcap.a libcap.pc
|
2013-11-01 18:47:27 +01:00
|
|
|
LIBCAP_MAKE_INSTALL_TARGET = install-static
|
2018-05-09 10:43:05 +02:00
|
|
|
else ifeq ($(BR2_SHARED_LIBS),y)
|
|
|
|
LIBCAP_MAKE_TARGET = all
|
|
|
|
LIBCAP_MAKE_INSTALL_TARGET = install-shared
|
2013-11-01 18:47:27 +01:00
|
|
|
else
|
|
|
|
LIBCAP_MAKE_TARGET = all
|
|
|
|
LIBCAP_MAKE_INSTALL_TARGET = install
|
|
|
|
endif
|
|
|
|
|
2014-04-20 21:30:13 +02:00
|
|
|
LIBCAP_MAKE_FLAGS = \
|
|
|
|
BUILD_CC="$(HOSTCC)" \
|
|
|
|
BUILD_CFLAGS="$(HOST_CFLAGS)"
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBCAP_TOOLS),y)
|
|
|
|
define LIBCAP_BUILD_TOOLS_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/progs \
|
2014-10-27 09:25:28 +01:00
|
|
|
$(LIBCAP_MAKE_FLAGS)
|
2014-04-20 21:30:13 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define LIBCAP_INSTALL_TOOLS_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/progs \
|
|
|
|
RAISE_SETFCAP=no prefix=/usr \
|
|
|
|
DESTDIR=$(TARGET_DIR) $(LIBCAP_MAKE_FLAGS) install
|
|
|
|
endef
|
|
|
|
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 \
|
2014-04-20 21:30:13 +02:00
|
|
|
$(LIBCAP_MAKE_FLAGS) $(LIBCAP_MAKE_TARGET)
|
|
|
|
$(LIBCAP_BUILD_TOOLS_CMDS)
|
2010-03-02 22:47:13 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define LIBCAP_INSTALL_STAGING_CMDS
|
2014-04-20 21:30:13 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libcap $(LIBCAP_MAKE_FLAGS) \
|
2013-11-01 18:47:27 +01:00
|
|
|
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
|
2014-04-20 21:30:13 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libcap $(LIBCAP_MAKE_FLAGS) \
|
2013-11-01 18:47:27 +01:00
|
|
|
DESTDIR=$(TARGET_DIR) prefix=/usr lib=lib $(LIBCAP_MAKE_INSTALL_TARGET)
|
2014-04-20 21:30:13 +02:00
|
|
|
$(LIBCAP_INSTALL_TOOLS_CMDS)
|
2010-03-02 22:47:13 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_LIBCAP_BUILD_CMDS
|
2016-02-24 15:26:31 +01:00
|
|
|
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)\
|
2016-03-16 21:20:08 +01:00
|
|
|
RAISE_SETFCAP=no
|
2010-03-02 22:47:13 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_LIBCAP_INSTALL_CMDS
|
2017-07-05 13:14:41 +02:00
|
|
|
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) prefix=$(HOST_DIR) \
|
|
|
|
RAISE_SETFCAP=no 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))
|