# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# 
# T2 SDE: package/.../coreutils/coreutils.conf
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 ROCK Linux Project
# 
# More information can be found in the files COPYING and README.
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- T2-COPYRIGHT-NOTE-END ---

# do not install su, we use shadow's su
var_append makeinstopt ' ' 'INSTALL_SU=echo'

coreutils_premake() {
	# remove man/Makefile.maint as it tries to rebuild man pages
	echo -n "" > man/Makefile.maint
}
hook_add premake 5 coreutils_premake

# translate some stuff from usr/bin to just bin/ ...
var_append INSTALL_WRAPPER_FILTER "|" \
                "sed -e 's,usr/bin/\(cat\|chgrp\|chmod\|chown\|cp\|cut\|dd\|df\
\|head\|ln\|ls\|mkdir\|mknod\|mv\|rm\|rmdir\|sync\|sync\|date\|echo\|false\
\|pwd\|stty\|tail\|true\|uname\|sleep\|sort\|touch\|readlink\),bin/\1,'"

hook_add postmake 5 'ln -sf install $root/usr/bin/ginstall'

# does not build otherwise
var_append GCC_WRAPPER_INSERT ' ' '-std=gnu99'