2016-08-23 08:58:34 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2015 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
|
2017-09-28 02:55:46 +00:00
|
|
|
PKG_CPE_ID:=cpe:/a:gnu:coreutils
|
2024-04-01 22:36:49 +00:00
|
|
|
PKG_VERSION:=9.5
|
2016-08-23 08:58:34 +00:00
|
|
|
|
2024-04-03 17:12:57 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2016-08-23 08:58:34 +00:00
|
|
|
PKG_SOURCE_URL:=@GNU/coreutils
|
2024-04-01 22:36:49 +00:00
|
|
|
PKG_HASH:=767ae6a22950ec42f3ba5f7c1de79dd27800ee8e9b8642da5dedb5974a1741e5
|
2016-08-23 08:58:34 +00:00
|
|
|
|
|
|
|
HOST_BUILD_PARALLEL := 1
|
|
|
|
|
2023-05-30 09:22:54 +00:00
|
|
|
PKG_PROGRAMS:=date readlink touch ln chown ginstall
|
2016-08-23 08:58:34 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
|
2023-03-23 07:49:01 +00:00
|
|
|
export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
|
|
|
|
|
2023-09-04 22:59:51 +00:00
|
|
|
HOST_GNULIB_SKIP := \
|
2024-04-01 22:36:49 +00:00
|
|
|
lib/nstrftime.c \
|
|
|
|
lib/fprintftime.c \
|
2024-06-14 07:58:19 +00:00
|
|
|
lib/fcntl.in.h \
|
2024-04-01 22:36:49 +00:00
|
|
|
lib/locale.in.h
|
2023-09-04 22:59:51 +00:00
|
|
|
|
2016-08-23 08:58:34 +00:00
|
|
|
HOST_CONFIGURE_ARGS += \
|
2023-05-30 09:22:54 +00:00
|
|
|
--enable-install-program=$(subst $(space),$(comma),$(strip $(PKG_PROGRAMS)))
|
2016-08-23 08:58:34 +00:00
|
|
|
|
|
|
|
HOST_MAKE_FLAGS += \
|
2023-03-23 07:49:01 +00:00
|
|
|
$(AM_TOOL_PATHS_FAKE) \
|
2023-05-30 09:22:54 +00:00
|
|
|
PROGRAMS="$(patsubst %,src/%,$(PKG_PROGRAMS))" \
|
2016-08-23 08:58:34 +00:00
|
|
|
LIBRARIES= MANS= SUBDIRS=.
|
|
|
|
|
2023-03-23 07:49:01 +00:00
|
|
|
define Host/Bootstrap
|
|
|
|
( \
|
|
|
|
cd $(HOST_BUILD_DIR); \
|
|
|
|
$(AM_TOOL_PATHS_FAKE) \
|
|
|
|
./bootstrap \
|
|
|
|
--bootstrap-sync \
|
|
|
|
--force \
|
|
|
|
--no-git \
|
|
|
|
--skip-po \
|
|
|
|
--gnulib-srcdir=$(GNULIB_SRCDIR) \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Prepare
|
|
|
|
$(call Host/Prepare/Default)
|
|
|
|
$(if $(QUILT),,$(call Host/Bootstrap))
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Configure
|
|
|
|
$(if $(QUILT),$(call Host/Bootstrap))
|
2023-09-04 22:59:51 +00:00
|
|
|
$(foreach src,$(HOST_GNULIB_SKIP),mv -f $(HOST_BUILD_DIR)/$(src)~ $(HOST_BUILD_DIR)/$(src) || true; )
|
2023-03-23 07:49:01 +00:00
|
|
|
$(call Host/Configure/Default)
|
|
|
|
endef
|
|
|
|
|
2016-08-23 08:58:34 +00:00
|
|
|
define Host/Install
|
|
|
|
$(INSTALL_DIR) $(1)/bin
|
2023-05-30 09:22:54 +00:00
|
|
|
$(INSTALL_BIN) $(patsubst %,$(HOST_BUILD_DIR)/src/%,$(PKG_PROGRAMS)) $(1)/bin/
|
2022-07-13 15:48:31 +00:00
|
|
|
ln -sf ginstall $(1)/bin/install
|
2016-08-23 08:58:34 +00:00
|
|
|
endef
|
|
|
|
|
2022-09-28 08:23:56 +00:00
|
|
|
define Host/Uninstall
|
|
|
|
rm -f $(STAGING_DIR_HOST)/bin/install
|
|
|
|
-$(call Host/Compile/Default,uninstall)
|
|
|
|
endef
|
|
|
|
|
2016-08-23 08:58:34 +00:00
|
|
|
$(eval $(call HostBuild))
|