2 # Copyright (C) 2008-2014 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
:=abed135279f87ad6762ce57ff6d89c41
17 PKG_BUILD_DEPENDS
:=libpthread
18 PKG_MAINTAINER
:=Jo-Philipp Wich
<jo@mein.io
>
22 include $(INCLUDE_DIR
)/package.mk
24 COREUTILS_APPLETS
:= \
25 base64
basename cat chcon chgrp chmod chown chroot cksum comm cp csplit \
26 cut date dd
dir dircolors dirname du echo env expand expr factor \
27 false fmt fold groups head hostid id
install join kill link ln logname \
28 ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup nproc od paste \
29 pathchk pinky pr printenv printf ptx pwd readlink realpath
rm rmdir \
30 runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred \
31 shuf sleep
sort split stat stdbuf stty sum sync tac tail tee
test \
32 timeout touch tr true truncate tsort tty uname unexpand uniq unlink \
33 uptime users vdir wc who whoami yes
35 DEPENDS_sort
= +libpthread
36 DEPENDS_timeout
= +librt
37 DEPENDS_expr
= +libgmp
38 DEPENDS_factor
= +libgmp
40 DEPENDS_dir
= +libacl
+libcap
41 DEPENDS_install
= +libacl
42 DEPENDS_ls
= +libacl
+libcap
44 DEPENDS_vdir
= +libacl
+libcap
46 FILES_stdbuf
:= usr
/lib
/coreutils
/libstdbuf.so
48 define Package
/coreutils
/Default
51 TITLE
:=The GNU core utilities
52 URL
:=http
://www.gnu.org
/software
/coreutils
/
55 define Package
/coreutils
56 $(call Package
/coreutils
/Default
)
57 TITLE
:=The GNU core utilities
61 define Package
/coreutils
/description
62 Full versions of standard GNU utilities. If an equivalent Busybox applet is
63 available
, you should consider compiling that instead
as Busybox applets are
64 usually smaller
, at the expense of reduced functionality.
69 $(call Package
/coreutils
/Default
)
70 DEPENDS
:=coreutils
$(DEPENDS_
$(2))
71 TITLE
:=Utility
$(2) from the GNU core utilities
74 define Package
/$(1)/description
75 Full version of standard GNU
$(2) utility.
79 $(foreach a
,$(COREUTILS_APPLETS
),$(eval
$(call GenPlugin
,coreutils-
$(a
),$(a
))))
82 gl_cv_func_mbrtowc_incomplete_state
=yes \
83 gl_cv_func_mbrtowc_retval
=yes \
84 gl_cv_func_wcrtomb_retval
=yes
86 ifneq ($(CONFIG_USE_UCLIBC
),)
88 ac_cv_type_pthread_spinlock_t
=$(if
$(filter 0.9.30% 0.9.2% 0.9.31%,$(call qstrip
,$(CONFIG_UCLIBC_VERSION
))),no
,yes
)
93 --enable-install-program
=su
96 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
97 DESTDIR
="$(PKG_INSTALL_DIR)" \
102 define Package
/coreutils
/install
107 define Package
/$(1)/install
108 $(INSTALL_DIR
) $$(1)/usr
/bin
109 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/$(2) $$(1)/usr
/bin
/
110 $(foreach f
,$(FILES_
$(2)),
111 $(INSTALL_DIR
) $$(1)/$(dir $(f
))
112 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/$(f
) $$(1)/$(f
)
116 $$(eval
$$(call BuildPackage
,$(1)))
119 $(eval
$(call BuildPackage
,coreutils
))
121 $(foreach a
,$(COREUTILS_APPLETS
),$(eval
$(call BuildPlugin
,coreutils-
$(a
),$(a
))))