1 ################################################################################
5 ################################################################################
8 LIBCAP_SITE
= https
://www.kernel.org
/pub
/linux
/libs
/security
/linux-privs
/libcap2
9 LIBCAP_SOURCE
= libcap-
$(LIBCAP_VERSION
).
tar.xz
10 LIBCAP_LICENSE
= GPLv2 or BSD-3c
11 LIBCAP_LICENSE_FILES
= License
13 LIBCAP_DEPENDENCIES
= host-libcap host-gperf
14 LIBCAP_INSTALL_STAGING
= YES
16 HOST_LIBCAP_DEPENDENCIES
= host-gperf
18 ifeq ($(BR2_STATIC_LIBS
),y
)
19 LIBCAP_MAKE_TARGET
= libcap.a libcap.
pc
20 LIBCAP_MAKE_INSTALL_TARGET
= install-static
22 LIBCAP_MAKE_TARGET
= all
23 LIBCAP_MAKE_INSTALL_TARGET
= install
27 BUILD_CC
="$(HOSTCC)" \
28 BUILD_CFLAGS
="$(HOST_CFLAGS)"
30 ifeq ($(BR2_PACKAGE_LIBCAP_TOOLS
),y
)
31 define LIBCAP_BUILD_TOOLS_CMDS
32 $(TARGET_MAKE_ENV
) $(TARGET_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
)/progs \
36 define LIBCAP_INSTALL_TOOLS_CMDS
37 $(TARGET_MAKE_ENV
) $(TARGET_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
)/progs \
38 RAISE_SETFCAP
=no
prefix=/usr \
39 DESTDIR
=$(TARGET_DIR
) $(LIBCAP_MAKE_FLAGS
) install
43 define LIBCAP_BUILD_CMDS
44 $(TARGET_MAKE_ENV
) $(TARGET_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
)/libcap \
45 $(LIBCAP_MAKE_FLAGS
) $(LIBCAP_MAKE_TARGET
)
46 $(LIBCAP_BUILD_TOOLS_CMDS
)
49 define LIBCAP_INSTALL_STAGING_CMDS
50 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)/libcap
$(LIBCAP_MAKE_FLAGS
) \
51 DESTDIR
=$(STAGING_DIR
) prefix=/usr lib
=lib
$(LIBCAP_MAKE_INSTALL_TARGET
)
54 define LIBCAP_INSTALL_TARGET_CMDS
55 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)/libcap
$(LIBCAP_MAKE_FLAGS
) \
56 DESTDIR
=$(TARGET_DIR
) prefix=/usr lib
=lib
$(LIBCAP_MAKE_INSTALL_TARGET
)
57 $(LIBCAP_INSTALL_TOOLS_CMDS
)
60 define HOST_LIBCAP_BUILD_CMDS
61 $(HOST_MAKE_ENV
) $(HOST_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
)\
65 define HOST_LIBCAP_INSTALL_CMDS
66 $(HOST_MAKE_ENV
) $(MAKE
) -C
$(@D
) DESTDIR
=$(HOST_DIR
) \
67 RAISE_SETFCAP
=no
prefix=/usr lib
=lib
install
70 $(eval
$(generic-package
))
71 $(eval
$(host-generic-package
))