scancpan: fix detection of native module
[buildroot-gz.git] / package / getent / getent.mk
blob18f09912a764be68455f3cba0a508a6eeb9a5cc3
1 ################################################################################
3 # getent
5 ################################################################################
7 # source included in Buildroot
8 GETENT_SOURCE =
10 GETENT_VERSION = buildroot-$(BR2_VERSION)
11 GETENT_LICENSE = LGPLv2.1+
13 # For glibc toolchains, we use the getent program built/installed by
14 # the C library. For other toolchains, we use the wrapper script
15 # included in this package.
16 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
17 # Sourcery toolchains install it in sysroot/usr/lib/bin
18 # Buildroot toolchains install it in sysroot/usr/bin
19 GETENT_LOCATION = $(firstword $(wildcard \
20 $(STAGING_DIR)/usr/bin/getent \
21 $(STAGING_DIR)/usr/lib/bin/getent))
22 else
23 GETENT_LOCATION = package/getent/getent
24 endif
26 define GETENT_INSTALL_TARGET_CMDS
27 $(INSTALL) -D -m 0755 $(GETENT_LOCATION) $(TARGET_DIR)/usr/bin/getent
28 endef
30 $(eval $(generic-package))