]> review.fuel-infra Code Review - packages/trusty/cirros-testvm.git/blob - getent.mk
18f09912a764be68455f3cba0a508a6eeb9a5cc3
[packages/trusty/cirros-testvm.git] / getent.mk
1 ################################################################################
2 #
3 # getent
4 #
5 ################################################################################
6
7 # source included in Buildroot
8 GETENT_SOURCE =
9
10 GETENT_VERSION = buildroot-$(BR2_VERSION)
11 GETENT_LICENSE = LGPLv2.1+
12
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
25
26 define GETENT_INSTALL_TARGET_CMDS
27         $(INSTALL) -D -m 0755 $(GETENT_LOCATION) $(TARGET_DIR)/usr/bin/getent
28 endef
29
30 $(eval $(generic-package))