1*4882a593Smuzhiyun################################################################################ 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# getent 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun################################################################################ 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunGETENT_LICENSE = LGPL-2.1+ 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun# For glibc toolchains, we use the getent program built/installed by 10*4882a593Smuzhiyun# the C library. For other toolchains, we use the wrapper script 11*4882a593Smuzhiyun# included in this package. 12*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y) 13*4882a593Smuzhiyun# Sourcery toolchains install it in sysroot/usr/lib/bin 14*4882a593Smuzhiyun# Buildroot toolchains install it in sysroot/usr/bin 15*4882a593SmuzhiyunGETENT_LOCATION = $(firstword $(wildcard \ 16*4882a593Smuzhiyun $(STAGING_DIR)/usr/bin/getent \ 17*4882a593Smuzhiyun $(STAGING_DIR)/usr/lib/bin/getent)) 18*4882a593Smuzhiyunelse 19*4882a593SmuzhiyunGETENT_LOCATION = package/getent/getent 20*4882a593Smuzhiyunendif 21*4882a593Smuzhiyun 22*4882a593Smuzhiyundefine GETENT_INSTALL_TARGET_CMDS 23*4882a593Smuzhiyun $(INSTALL) -D -m 0755 $(GETENT_LOCATION) $(TARGET_DIR)/usr/bin/getent 24*4882a593Smuzhiyunendef 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun$(eval $(generic-package)) 27