Blob Blame History Raw
#
# set +o errexit -o noglob -o nounset is assumed.
#

pkg_autoconf_2_64_host_install_make_post() {
	local _bin_fname="" _fname="";

	rtl_fileop mkdir "${PKG_DESTDIR}/libexec/autoconf-${PKG_VERSION}" || return 1;
	for _bin_fname in	\
			$(find "${PKG_DESTDIR}/bin" -type f -perm /0111); do
		rtl_fileop mv "${_bin_fname}" "${PKG_DESTDIR}/libexec/autoconf-${PKG_VERSION}" || return 1;
		cat >"${_bin_fname}-${PKG_VERSION}" <<EOF
#!/bin/sh
export ACLOCAL="\${0%/*}/aclocal-1.11";
export AC_MACRODIR="\${0%/*}/../share/autoconf-${PKG_VERSION}";
export AUTOCONF="\${0%/*}/../libexec/autoconf-${PKG_VERSION}/autoconf";
export AUTOHEADER="\${0%/*}/../libexec/autoconf-${PKG_VERSION}/autoheader";
export AUTOM4TE="\${0%/*}/../libexec/autoconf-${PKG_VERSION}/autom4te";
export AUTOM4TE_CFG="\${0%/*}/../share/autoconf-${PKG_VERSION}/autom4te.cfg";
export autom4te_perllibdir="\${0%/*}/../share/autoconf-${PKG_VERSION}/autoconf";
export AUTOMAKE="\${0%/*}/automake-1.11";
export AUTOPOINT="\${0%/*}/../libexec/autoconf-${PKG_VERSION}/autopoint";
export LIBTOOLIZE="\${0%/*}/../libexec/autoconf-${PKG_VERSION}/libtoolize";
exec "\${0%/*}/../libexec/autoconf-${PKG_VERSION}/${_bin_fname##*/}" "\${@}";
EOF
		[ "${?}" -ne 0 ] && return 1;
		rtl_fileop chmod 0755 "${_bin_fname}-${PKG_VERSION}";
	done;
	rtl_fileop mv "${PKG_DESTDIR}/share/autoconf-${PKG_VERSION}/autom4te.cfg" "${PKG_DESTDIR}/share/autoconf" || return 1;
	rtl_fileop rm "${PKG_DESTDIR}/share/autoconf-${PKG_VERSION}";
	rtl_fileop mv "${PKG_DESTDIR}/share/autoconf" "${PKG_DESTDIR}/share/autoconf-${PKG_VERSION}";
	rtl_fileop rm "${PKG_DESTDIR}/share/info/dir" || return 1;
	for _fname in	\
			$(find "${PKG_DESTDIR}/share/man" -type f -name "*.[0-9]*")	\
			$(find "${PKG_DESTDIR}/share/info" -type f -name "*.info*"); do
		rtl_fileop mv "${_fname}" "${_fname%.*}-${PKG_VERSION}.${_fname##*.}" || return 1;
	done;
};

# vim:filetype=sh textwidth=0