|
@@ -0,0 +1,110 @@
|
|
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
|
+
|
|
8
|
+include $(TOPDIR)/rules.mk
|
|
9
|
+
|
|
10
|
+PKG_NAME:=coreutils
|
|
11
|
+PKG_VERSION:=8.16
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
15
|
+PKG_SOURCE_URL:=@GNU/coreutils
|
|
16
|
+PKG_MD5SUM:=89b06f91634208dceba7b36ad1f9e8b9
|
|
17
|
+PKG_BUILD_DEPENDS:=libpthread
|
|
18
|
+PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
|
|
19
|
+
|
|
20
|
+PKG_BUILD_PARALLEL:=1
|
|
21
|
+
|
|
22
|
+include $(INCLUDE_DIR)/package.mk
|
|
23
|
+
|
|
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
|
|
34
|
+
|
|
35
|
+DEPENDS_sort = +libpthread
|
|
36
|
+DEPENDS_timeout = +librt
|
|
37
|
+DEPENDS_uptime = +libelf1
|
|
38
|
+DEPENDS_expr = +libgmp
|
|
39
|
+DEPENDS_factor = +libgmp
|
|
40
|
+
|
|
41
|
+define Package/coreutils/Default
|
|
42
|
+ SECTION:=utils
|
|
43
|
+ CATEGORY:=Utilities
|
|
44
|
+ TITLE:=The GNU core utilities
|
|
45
|
+ URL:=http://www.gnu.org/software/coreutils/
|
|
46
|
+endef
|
|
47
|
+
|
|
48
|
+define Package/coreutils
|
|
49
|
+ $(call Package/coreutils/Default)
|
|
50
|
+ TITLE:=The GNU core utilities
|
|
51
|
+ MENU:=1
|
|
52
|
+endef
|
|
53
|
+
|
|
54
|
+define Package/coreutils/description
|
|
55
|
+ Full versions of standard GNU utilities. Normally, you would not use this
|
|
56
|
+ package, since the functionality in BusyBox is more than sufficient and
|
|
57
|
+ smaller.
|
|
58
|
+endef
|
|
59
|
+
|
|
60
|
+define GenPlugin
|
|
61
|
+ define Package/$(1)
|
|
62
|
+ $(call Package/coreutils/Default)
|
|
63
|
+ DEPENDS:=coreutils $(DEPENDS_$(2))
|
|
64
|
+ TITLE:=Utility $(2) from the GNU core utilities
|
|
65
|
+ endef
|
|
66
|
+
|
|
67
|
+ define Package/$(1)/description
|
|
68
|
+ Full version of standard GNU $(2) utility. Normally, you would not use this
|
|
69
|
+ package, since the functionality in BusyBox is more than sufficient.
|
|
70
|
+ endef
|
|
71
|
+endef
|
|
72
|
+
|
|
73
|
+$(foreach a,$(COREUTILS_APPLETS),$(eval $(call GenPlugin,coreutils-$(a),$(a))))
|
|
74
|
+
|
|
75
|
+CONFIGURE_VARS += \
|
|
76
|
+ gl_cv_func_mbrtowc_incomplete_state=yes \
|
|
77
|
+ gl_cv_func_mbrtowc_retval=yes \
|
|
78
|
+ gl_cv_func_wcrtomb_retval=yes
|
|
79
|
+
|
|
80
|
+ifneq ($(CONFIG_USE_UCLIBC),)
|
|
81
|
+ CONFIGURE_VARS += \
|
|
82
|
+ ac_cv_type_pthread_spinlock_t=$(if $(filter 0.9.30% 0.9.2% 0.9.31%,$(call qstrip,$(CONFIG_UCLIBC_VERSION))),no,yes)
|
|
83
|
+endif
|
|
84
|
+
|
|
85
|
+CONFIGURE_ARGS += \
|
|
86
|
+ --enable-install-program=su
|
|
87
|
+
|
|
88
|
+define Build/Compile
|
|
89
|
+ $(MAKE) -C $(PKG_BUILD_DIR) \
|
|
90
|
+ DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
91
|
+ SHELL="/bin/bash" \
|
|
92
|
+ all install install-root
|
|
93
|
+endef
|
|
94
|
+
|
|
95
|
+define Package/coreutils/install
|
|
96
|
+ true
|
|
97
|
+endef
|
|
98
|
+
|
|
99
|
+define BuildPlugin
|
|
100
|
+ define Package/$(1)/install
|
|
101
|
+ $(INSTALL_DIR) $$(1)/usr/bin
|
|
102
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/
|
|
103
|
+ endef
|
|
104
|
+
|
|
105
|
+ $$(eval $$(call BuildPackage,$(1)))
|
|
106
|
+endef
|
|
107
|
+
|
|
108
|
+$(eval $(call BuildPackage,coreutils))
|
|
109
|
+
|
|
110
|
+$(foreach a,$(COREUTILS_APPLETS),$(eval $(call BuildPlugin,coreutils-$(a),$(a))))
|