2 # Copyright (C) 2008-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNU/coreutils
16 PKG_MD5SUM:=89b06f91634208dceba7b36ad1f9e8b9
17 PKG_BUILD_DEPENDS:=libpthread
21 include $(INCLUDE_DIR)/package.mk
23 COREUTILS_APPLETS := \
24 base64 basename cat chcon chgrp chmod chown chroot cksum comm cp csplit \
25 cut date dd dir dircolors dirname du echo env expand expr factor \
26 false fmt fold groups head hostid id install join kill link ln logname \
27 ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup nproc od paste \
28 pathchk pinky pr printenv printf ptx pwd readlink realpath rm rmdir \
29 runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred \
30 shuf sleep sort split stat stdbuf stty sum sync tac tail tee test \
31 timeout touch tr true truncate tsort tty uname unexpand uniq unlink \
32 uptime users vdir wc who whoami yes
34 DEPENDS_sort = +libpthread
35 DEPENDS_timeout = +librt
36 DEPENDS_uptime = +libelf
37 DEPENDS_expr = +libgmp
38 DEPENDS_factor = +libgmp
40 define Package/coreutils/Default
43 TITLE:=The GNU core utilities
44 URL:=http://www.gnu.org/software/coreutils/
47 define Package/coreutils
48 $(call Package/coreutils/Default)
49 TITLE:=The GNU core utilities
53 define Package/coreutils/description
54 Full versions of standard GNU utilities. Normally, you would not use this
55 package, since the functionality in BusyBox is more than sufficient and
61 $(call Package/coreutils/Default)
62 DEPENDS:=coreutils $(DEPENDS_$(2))
63 TITLE:=Utility $(2) from the GNU core utilities
66 define Package/$(1)/description
67 Full version of standard GNU $(2) utility. Normally, you would not use this
68 package, since the functionality in BusyBox is more than sufficient.
72 $(foreach a,$(COREUTILS_APPLETS),$(eval $(call GenPlugin,coreutils-$(a),$(a))))
75 gl_cv_func_mbrtowc_incomplete_state=yes \
76 gl_cv_func_mbrtowc_retval=yes \
77 gl_cv_func_wcrtomb_retval=yes
79 ifneq ($(CONFIG_USE_UCLIBC),)
81 ac_cv_type_pthread_spinlock_t=$(if $(filter 0.9.30% 0.9.2% 0.9.31%,$(call qstrip,$(CONFIG_UCLIBC_VERSION))),no,yes)
85 --enable-install-program=su
88 $(MAKE) -C $(PKG_BUILD_DIR) \
89 DESTDIR="$(PKG_INSTALL_DIR)" \
91 all install install-root
94 define Package/coreutils/install
99 define Package/$(1)/install
100 $(INSTALL_DIR) $$(1)/usr/bin
101 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/
104 $$(eval $$(call BuildPackage,$(1)))
107 $(eval $(call BuildPackage,coreutils))
109 $(foreach a,$(COREUTILS_APPLETS),$(eval $(call BuildPlugin,coreutils-$(a),$(a))))