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
14 LIBCAP_INSTALL_STAGING
= YES
16 ifeq ($(BR2_PACKAGE_ATTR
),y
)
17 LIBCAP_DEPENDENCIES
+= attr
18 LIBCAP_HAVE_LIBATTR
= yes
20 LIBCAP_HAVE_LIBATTR
= no
23 # we don't have host-attr
24 HOST_LIBCAP_DEPENDENCIES
=
26 ifeq ($(BR2_STATIC_LIBS
),y
)
27 LIBCAP_MAKE_TARGET
= libcap.a
28 LIBCAP_MAKE_INSTALL_TARGET
= install-static
30 LIBCAP_MAKE_TARGET
= all
31 LIBCAP_MAKE_INSTALL_TARGET
= install
35 LIBATTR
=$(LIBCAP_HAVE_LIBATTR
) \
36 BUILD_CC
="$(HOSTCC)" \
37 BUILD_CFLAGS
="$(HOST_CFLAGS)"
39 ifeq ($(BR2_PACKAGE_LIBCAP_TOOLS
),y
)
40 define LIBCAP_BUILD_TOOLS_CMDS
41 $(TARGET_MAKE_ENV
) $(TARGET_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
)/progs \
45 define LIBCAP_INSTALL_TOOLS_CMDS
46 $(TARGET_MAKE_ENV
) $(TARGET_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
)/progs \
47 RAISE_SETFCAP
=no
prefix=/usr \
48 DESTDIR
=$(TARGET_DIR
) $(LIBCAP_MAKE_FLAGS
) install
52 define LIBCAP_BUILD_CMDS
53 $(TARGET_MAKE_ENV
) $(TARGET_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
)/libcap \
54 $(LIBCAP_MAKE_FLAGS
) $(LIBCAP_MAKE_TARGET
)
55 $(LIBCAP_BUILD_TOOLS_CMDS
)
58 define LIBCAP_INSTALL_STAGING_CMDS
59 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)/libcap
$(LIBCAP_MAKE_FLAGS
) \
60 DESTDIR
=$(STAGING_DIR
) prefix=/usr lib
=lib
$(LIBCAP_MAKE_INSTALL_TARGET
)
63 define LIBCAP_INSTALL_TARGET_CMDS
64 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)/libcap
$(LIBCAP_MAKE_FLAGS
) \
65 DESTDIR
=$(TARGET_DIR
) prefix=/usr lib
=lib
$(LIBCAP_MAKE_INSTALL_TARGET
)
66 $(LIBCAP_INSTALL_TOOLS_CMDS
)
69 define HOST_LIBCAP_BUILD_CMDS
70 $(HOST_MAKE_ENV
) $(HOST_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
) LIBATTR
=no
73 define HOST_LIBCAP_INSTALL_CMDS
74 $(HOST_MAKE_ENV
) $(MAKE
) -C
$(@D
) LIBATTR
=no DESTDIR
=$(HOST_DIR
) \
75 prefix=/usr lib
=lib
install
78 $(eval
$(generic-package
))
79 $(eval
$(host-generic-package
))