You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
3.0 KiB

  1. #
  2. # Copyright (C) 2008-2014 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_VERSION:=8.16
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/coreutils
  13. PKG_MD5SUM:=89b06f91634208dceba7b36ad1f9e8b9
  14. PKG_BUILD_DEPENDS:=libpthread
  15. PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. COREUTILS_APPLETS := \
  19. base64 basename cat chcon chgrp chmod chown chroot cksum comm cp csplit \
  20. cut date dd dir dircolors dirname du echo env expand expr factor \
  21. false fmt fold groups head hostid id install join kill link ln logname \
  22. ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup nproc od paste \
  23. pathchk pinky pr printenv printf ptx pwd readlink realpath rm rmdir \
  24. runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred \
  25. shuf sleep sort split stat stdbuf stty sum sync tac tail tee test \
  26. timeout touch tr true truncate tsort tty uname unexpand uniq unlink \
  27. uptime users vdir wc who whoami yes
  28. DEPENDS_sort = +libpthread
  29. DEPENDS_timeout = +librt
  30. DEPENDS_uptime = +libelf1
  31. DEPENDS_expr = +libgmp
  32. DEPENDS_factor = +libgmp
  33. define Package/coreutils/Default
  34. SECTION:=utils
  35. CATEGORY:=Utilities
  36. TITLE:=The GNU core utilities
  37. URL:=http://www.gnu.org/software/coreutils/
  38. endef
  39. define Package/coreutils
  40. $(call Package/coreutils/Default)
  41. TITLE:=The GNU core utilities
  42. MENU:=1
  43. endef
  44. define Package/coreutils/description
  45. Full versions of standard GNU utilities. Normally, you would not use this
  46. package, since the functionality in BusyBox is more than sufficient and
  47. smaller.
  48. endef
  49. define GenPlugin
  50. define Package/$(1)
  51. $(call Package/coreutils/Default)
  52. DEPENDS:=coreutils $(DEPENDS_$(2))
  53. TITLE:=Utility $(2) from the GNU core utilities
  54. endef
  55. define Package/$(1)/description
  56. Full version of standard GNU $(2) utility. Normally, you would not use this
  57. package, since the functionality in BusyBox is more than sufficient.
  58. endef
  59. endef
  60. $(foreach a,$(COREUTILS_APPLETS),$(eval $(call GenPlugin,coreutils-$(a),$(a))))
  61. CONFIGURE_VARS += \
  62. gl_cv_func_mbrtowc_incomplete_state=yes \
  63. gl_cv_func_mbrtowc_retval=yes \
  64. gl_cv_func_wcrtomb_retval=yes
  65. ifneq ($(CONFIG_USE_UCLIBC),)
  66. CONFIGURE_VARS += \
  67. ac_cv_type_pthread_spinlock_t=$(if $(filter 0.9.30% 0.9.2% 0.9.31%,$(call qstrip,$(CONFIG_UCLIBC_VERSION))),no,yes)
  68. endif
  69. CONFIGURE_ARGS += \
  70. --enable-install-program=su
  71. define Build/Compile
  72. $(MAKE) -C $(PKG_BUILD_DIR) \
  73. DESTDIR="$(PKG_INSTALL_DIR)" \
  74. SHELL="/bin/bash" \
  75. all install install-root
  76. endef
  77. define Package/coreutils/install
  78. true
  79. endef
  80. define BuildPlugin
  81. define Package/$(1)/install
  82. $(INSTALL_DIR) $$(1)/usr/bin
  83. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/
  84. endef
  85. $$(eval $$(call BuildPackage,$(1)))
  86. endef
  87. $(eval $(call BuildPackage,coreutils))
  88. $(foreach a,$(COREUTILS_APPLETS),$(eval $(call BuildPlugin,coreutils-$(a),$(a))))