2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
10 PKG_CPE_ID
:=cpe
:/a
:gnu
:coreutils
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_SOURCE_URL
:=@GNU
/coreutils
15 PKG_HASH
:=2bec616375002c92c1ed5ead32a092b174fe44c14bc736d32e5961053b821d84
17 HOST_BUILD_PARALLEL
:= 1
19 PKG_PROGRAMS
:=chown cp date ginstall ln readlink realpath rmdir seq stat touch
21 include $(INCLUDE_DIR
)/host-build.mk
23 export GNULIB_SRCDIR
:=$(HOST_GNULIB_SRCDIR
)
26 lib
/iconv_open-aix.gperf \
27 lib
/iconv_open-hpux.gperf \
28 lib
/iconv_open-irix.gperf \
29 lib
/iconv_open-osf.gperf \
30 lib
/iconv_open-solaris.gperf \
31 lib
/iconv_open-zos.gperf
33 HOST_CONFIGURE_ARGS
+= \
34 --enable-install-program
=$(subst $(space
),$(comma
),$(strip $(PKG_PROGRAMS
)))
37 $(AM_TOOL_PATHS
) AUTOPOINT
="$(TRUE)" GTKDOCIZE
="$(TRUE)" \
38 am__CONFIG_DISTCLEAN_FILES
= \
39 MAINTAINERCLEANFILES
='$$$$(filter-out lib/iconv_open% %.texi,$$$$(BUILT_SOURCES))' \
40 PROGRAMS
="$(patsubst %,src/%,$(PKG_PROGRAMS))" \
41 LIBRARIES
= MANS
= SUBDIRS
=.
45 cd
$(HOST_BUILD_DIR
); \
46 $(AM_TOOL_PATHS
) AUTOPOINT
="$(TRUE)" GTKDOCIZE
="$(TRUE)" \
52 --gnulib-srcdir
=$(GNULIB_SRCDIR
) \
57 $(call Host
/Prepare
/Default
)
58 $(if
$(QUILT
),,$(call Host
/Bootstrap
))
62 $(if
$(QUILT
),$(call Host
/Bootstrap
))
63 $(foreach src
,$(HOST_GNULIB_SKIP
),mv
-f
$(HOST_BUILD_DIR
)/$(src
)~
$(HOST_BUILD_DIR
)/$(src
) || true
; )
64 $(call Host
/Configure
/Default
)
65 $(call Host
/Uninstall
)
66 $(call Host
/Compile
/Default
,lib
/config.h
)
70 $(INSTALL_DIR
) $(1)/bin
71 $(foreach prog
,$(filter-out g
%,$(PKG_PROGRAMS
)),$(INSTALL_BIN
) $(patsubst %,$(HOST_BUILD_DIR
)/src
/%,$(prog
)) $(1)/bin
/g
$(prog
); )
72 $(foreach prog
,$(filter g
%,$(PKG_PROGRAMS
)),$(INSTALL_BIN
) $(patsubst %,$(HOST_BUILD_DIR
)/src
/%,$(prog
)) $(1)/bin
/$(prog
); )
73 $(foreach prog
,$(filter-out g
%,$(PKG_PROGRAMS
)),g
$(LN
) g
$(prog
) $(1)/bin
/$(prog
); )
74 $(foreach prog
,$(filter g
%,$(PKG_PROGRAMS
)),g
$(LN
) $(prog
) $(1)/bin
/$(patsubst g
%,%,$(prog
)); )
78 #$(call Host/Compile/Default,uninstall) # Removes necessary symlinks
79 -$(call Host
/Compile
/Default
,maintainer-clean
) # Clean bootstrap files from the release
82 $(eval
$(call HostBuild
))