getent.mk 816 B

1234567891011121314151617181920212223242526
  1. ################################################################################
  2. #
  3. # getent
  4. #
  5. ################################################################################
  6. GETENT_LICENSE = LGPL-2.1+
  7. # For glibc toolchains, we use the getent program built/installed by
  8. # the C library. For other toolchains, we use the wrapper script
  9. # included in this package.
  10. ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
  11. # Sourcery toolchains install it in sysroot/usr/lib/bin
  12. # Buildroot toolchains install it in sysroot/usr/bin
  13. GETENT_LOCATION = $(firstword $(wildcard \
  14. $(STAGING_DIR)/usr/bin/getent \
  15. $(STAGING_DIR)/usr/lib/bin/getent))
  16. else
  17. GETENT_LOCATION = package/getent/getent
  18. endif
  19. define GETENT_INSTALL_TARGET_CMDS
  20. $(INSTALL) -D -m 0755 $(GETENT_LOCATION) $(TARGET_DIR)/usr/bin/getent
  21. endef
  22. $(eval $(generic-package))