2014-06-11 15:02:24 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2008-2014 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=coreutils
|
2023-05-08 09:37:08 +00:00
|
|
|
PKG_VERSION:=9.3
|
2022-07-16 10:47:26 +00:00
|
|
|
PKG_RELEASE:=1
|
2014-06-11 15:02:24 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
|
|
PKG_SOURCE_URL:=@GNU/coreutils
|
2023-05-08 09:37:08 +00:00
|
|
|
PKG_HASH:=adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa
|
2020-04-22 23:06:53 +00:00
|
|
|
|
2016-06-07 10:00:01 +00:00
|
|
|
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
2020-04-22 23:06:53 +00:00
|
|
|
PKG_LICENSE:=GPL-3.0-or-later
|
|
|
|
PKG_LICENSE_FILES:=COPYING
|
2019-09-12 12:13:21 +00:00
|
|
|
PKG_CPE_ID:=cpe:/a:gnu:coreutils
|
2014-06-11 15:02:24 +00:00
|
|
|
|
2020-09-03 20:49:50 +00:00
|
|
|
PKG_INSTALL:=1
|
2014-06-11 15:02:24 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
COREUTILS_APPLETS := \
|
2020-04-27 23:08:28 +00:00
|
|
|
base32 base64 basename basenc b2sum cat chcon chgrp chmod chown chroot \
|
|
|
|
cksum comm cp csplit cut date dd df dir dircolors dirname du echo env \
|
|
|
|
expand expr factor false fmt fold groups head hostid id install join \
|
|
|
|
kill link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl \
|
|
|
|
nohup nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd \
|
|
|
|
readlink realpath rm rmdir runcon seq sha1sum sha224sum sha256sum \
|
|
|
|
sha384sum sha512sum shred shuf sleep sort split stat stdbuf stty sum \
|
|
|
|
sync tac tail tee test timeout touch tr true truncate tsort tty uname \
|
|
|
|
unexpand uniq unlink uptime users vdir wc who whoami yes
|
2014-06-11 15:02:24 +00:00
|
|
|
|
2019-07-13 09:52:16 +00:00
|
|
|
DIR_BIN := \
|
2020-04-27 23:08:28 +00:00
|
|
|
base64 cat chgrp chmod chown cp date dd df echo false kill link ln ls \
|
2019-07-13 09:52:16 +00:00
|
|
|
mkdir mknod mktemp mv nice printenv pwd rm rmdir sleep stat stty sync \
|
|
|
|
touch true uname
|
|
|
|
|
|
|
|
DIR_USR_BIN := \
|
2020-10-26 21:43:43 +00:00
|
|
|
basename chcon cksum comm cut dirname du env expand expr factor fold \
|
|
|
|
groups head hostid id install logname md5sum mkfifo nl nohup nproc od \
|
2020-10-27 18:39:53 +00:00
|
|
|
paste printf readlink realpath runcon seq sha1sum sha256sum sha512sum \
|
|
|
|
shred shuf sort split sum tac tail tee test timeout tr truncate tty \
|
|
|
|
unexpand uniq unlink uptime users wc who whoami yes
|
2019-07-13 09:52:16 +00:00
|
|
|
|
|
|
|
DIR_USR_SBIN := \
|
|
|
|
chroot
|
|
|
|
|
|
|
|
# BusyBox does not provide these yet
|
|
|
|
DIR_OTHERS := \
|
2020-10-26 21:43:43 +00:00
|
|
|
base32 b2sum basenc csplit dir dircolors fmt join numfmt pathchk pinky \
|
2020-10-27 18:39:53 +00:00
|
|
|
pr ptx sha224sum sha384sum stdbuf tsort vdir
|
2019-07-13 09:52:16 +00:00
|
|
|
|
2020-06-12 12:35:04 +00:00
|
|
|
$(eval $(foreach a,$(DIR_BIN),ALTS_$(a):=300:/bin/$(a):/usr/libexec/$(a)-coreutils$(newline)))
|
|
|
|
$(eval $(foreach a,$(DIR_USR_BIN),ALTS_$(a):=300:/usr/bin/$(a):/usr/libexec/$(a)-coreutils$(newline)))
|
|
|
|
$(eval $(foreach a,$(DIR_USR_SBIN),ALTS_$(a):=300:/usr/sbin/$(a):/usr/libexec/$(a)-coreutils$(newline)))
|
2019-07-13 09:52:16 +00:00
|
|
|
|
2014-06-11 15:02:24 +00:00
|
|
|
DEPENDS_sort = +libpthread
|
|
|
|
DEPENDS_timeout = +librt
|
|
|
|
DEPENDS_expr = +libgmp
|
|
|
|
DEPENDS_factor = +libgmp
|
2014-11-17 18:43:29 +00:00
|
|
|
DEPENDS_cp = +libacl
|
2017-01-18 11:08:40 +00:00
|
|
|
DEPENDS_dir = +libacl +libcap
|
2014-11-17 18:43:29 +00:00
|
|
|
DEPENDS_install = +libacl
|
2017-01-18 11:08:40 +00:00
|
|
|
DEPENDS_ls = +libacl +libcap
|
2014-11-17 18:43:29 +00:00
|
|
|
DEPENDS_mv = +libacl
|
2017-01-18 11:08:40 +00:00
|
|
|
DEPENDS_vdir = +libacl +libcap
|
2014-06-11 15:02:24 +00:00
|
|
|
|
2017-06-19 01:47:00 +00:00
|
|
|
FILES_stdbuf := usr/lib/coreutils/libstdbuf.so
|
|
|
|
|
2014-06-11 15:02:24 +00:00
|
|
|
define Package/coreutils/Default
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
TITLE:=The GNU core utilities
|
|
|
|
URL:=http://www.gnu.org/software/coreutils/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/coreutils
|
|
|
|
$(call Package/coreutils/Default)
|
|
|
|
TITLE:=The GNU core utilities
|
|
|
|
MENU:=1
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/coreutils/description
|
2016-07-30 13:23:45 +00:00
|
|
|
Full versions of standard GNU utilities. If an equivalent Busybox applet is
|
|
|
|
available, you should consider compiling that instead as Busybox applets are
|
|
|
|
usually smaller, at the expense of reduced functionality.
|
2014-06-11 15:02:24 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define GenPlugin
|
|
|
|
define Package/$(1)
|
|
|
|
$(call Package/coreutils/Default)
|
|
|
|
DEPENDS:=coreutils $(DEPENDS_$(2))
|
|
|
|
TITLE:=Utility $(2) from the GNU core utilities
|
2019-07-13 09:52:16 +00:00
|
|
|
ALTERNATIVES:=$(ALTS_$(2))
|
2014-06-11 15:02:24 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/$(1)/description
|
2016-07-30 13:23:45 +00:00
|
|
|
Full version of standard GNU $(2) utility.
|
2014-06-11 15:02:24 +00:00
|
|
|
endef
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach a,$(COREUTILS_APPLETS),$(eval $(call GenPlugin,coreutils-$(a),$(a))))
|
|
|
|
|
|
|
|
CONFIGURE_VARS += \
|
|
|
|
gl_cv_func_mbrtowc_incomplete_state=yes \
|
|
|
|
gl_cv_func_mbrtowc_retval=yes \
|
2020-09-24 19:35:12 +00:00
|
|
|
gl_cv_func_wcrtomb_retval=yes \
|
|
|
|
ac_cv_header_selinux_context_h=no \
|
|
|
|
ac_cv_header_selinux_flash_h=no \
|
|
|
|
ac_cv_header_selinux_selinux_h=no \
|
|
|
|
ac_cv_search_setfilecon=no
|
2014-06-11 15:02:24 +00:00
|
|
|
|
|
|
|
CONFIGURE_ARGS += \
|
2014-07-04 10:56:50 +00:00
|
|
|
--disable-xattr \
|
2020-04-22 23:06:53 +00:00
|
|
|
--enable-install-program=su \
|
|
|
|
--enable-threads=posix \
|
|
|
|
--enable-acl \
|
|
|
|
--disable-assert \
|
|
|
|
--disable-rpath \
|
|
|
|
--disable-libsmack \
|
|
|
|
--enable-libcap \
|
|
|
|
--without-linux-crypto \
|
|
|
|
--without-openssl \
|
|
|
|
--$(if $(CONFIG_USE_MUSL),with,without)-included-regex \
|
|
|
|
--without-selinux \
|
|
|
|
--with-gmp
|
2014-06-11 15:02:24 +00:00
|
|
|
|
|
|
|
define Package/coreutils/install
|
|
|
|
true
|
|
|
|
endef
|
|
|
|
|
|
|
|
define BuildPlugin
|
|
|
|
define Package/$(1)/install
|
2020-06-12 12:35:04 +00:00
|
|
|
$(INSTALL_DIR) $$(1)/usr/$(if $(ALTS_$(2)),libexec,bin)
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/$(if $(ALTS_$(2)),libexec/$(2)-coreutils,bin/$(2))
|
2017-06-19 01:47:00 +00:00
|
|
|
$(foreach f,$(FILES_$(2)),
|
|
|
|
$(INSTALL_DIR) $$(1)/$(dir $(f))
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/$(f) $$(1)/$(f)
|
|
|
|
)
|
2014-06-11 15:02:24 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$$(eval $$(call BuildPackage,$(1)))
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,coreutils))
|
|
|
|
|
|
|
|
$(foreach a,$(COREUTILS_APPLETS),$(eval $(call BuildPlugin,coreutils-$(a),$(a))))
|