Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=coreutils
  9. PKG_CPE_ID:=cpe:/a:gnu:coreutils
  10. PKG_VERSION:=9.3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/coreutils
  13. PKG_HASH:=adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa
  14. HOST_BUILD_PARALLEL := 1
  15. PKG_PROGRAMS:=date readlink touch ln chown ginstall
  16. include $(INCLUDE_DIR)/host-build.mk
  17. export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
  18. HOST_CONFIGURE_ARGS += \
  19. --enable-install-program=$(subst $(space),$(comma),$(strip $(PKG_PROGRAMS)))
  20. HOST_MAKE_FLAGS += \
  21. $(AM_TOOL_PATHS_FAKE) \
  22. PROGRAMS="$(patsubst %,src/%,$(PKG_PROGRAMS))" \
  23. LIBRARIES= MANS= SUBDIRS=.
  24. define Host/Bootstrap
  25. ( \
  26. cd $(HOST_BUILD_DIR); \
  27. $(AM_TOOL_PATHS_FAKE) \
  28. ./bootstrap \
  29. --bootstrap-sync \
  30. --force \
  31. --no-git \
  32. --skip-po \
  33. --gnulib-srcdir=$(GNULIB_SRCDIR) \
  34. )
  35. endef
  36. define Host/Prepare
  37. $(call Host/Prepare/Default)
  38. $(if $(QUILT),,$(call Host/Bootstrap))
  39. endef
  40. define Host/Configure
  41. $(if $(QUILT),$(call Host/Bootstrap))
  42. -$(CP) $(HOST_BUILD_DIR)/lib/time.in.h~ $(HOST_BUILD_DIR)/lib/time.in.h # @GNULIB_TIME@ not defined
  43. $(call Host/Configure/Default)
  44. endef
  45. define Host/Install
  46. $(INSTALL_DIR) $(1)/bin
  47. $(INSTALL_BIN) $(patsubst %,$(HOST_BUILD_DIR)/src/%,$(PKG_PROGRAMS)) $(1)/bin/
  48. ln -sf ginstall $(1)/bin/install
  49. endef
  50. define Host/Uninstall
  51. rm -f $(STAGING_DIR_HOST)/bin/install
  52. -$(call Host/Compile/Default,uninstall)
  53. endef
  54. $(eval $(call HostBuild))