summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-05-07 19:51:08 +0100
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-05-07 19:51:08 +0100
commite1a4743914675267e94b3510bea6d8c8c357a32e (patch)
tree99c2d3db3c3655e5ddec869dc7f20f4022583ebd
parent99bdce02bb3c13e80cd846f4b021d1929b2f0910 (diff)
downloadmidipix_build-e1a4743914675267e94b3510bea6d8c8c357a32e.tar.bz2
midipix_build-e1a4743914675267e94b3510bea6d8c8c357a32e.tar.xz
vars/autoconf_2_64_host.vars: updated.
subr.rtl/rtl_install.subr: implements -* (rm,) !*=* (mv,) m[0-7]{4}= (chmod,) and o*=* (chown.)
-rw-r--r--subr.rtl/rtl_install.subr76
-rw-r--r--vars/autoconf_2_64_host.vars46
2 files changed, 83 insertions, 39 deletions
diff --git a/subr.rtl/rtl_install.subr b/subr.rtl/rtl_install.subr
index be940cd9..db305cd0 100644
--- a/subr.rtl/rtl_install.subr
+++ b/subr.rtl/rtl_install.subr
@@ -3,17 +3,46 @@
#
rtl_install() {
- local _verbose="" _prefix="" _ln_target="" _ln_fname="" \
- _mkdir_fname="" _file_fname_src="" _file_fname_dst="";
- if [ "${1}" = "-v" ]; then
- _verbose=1; shift;
- fi; _prefix="${1}"; shift;
+ local _verbose="" _prefix="" _chmod_mode="" _dname="" _file_fname_dst="" \
+ _file_fname_src="" _fname="" _ln_fname="" _ln_target="" _owner_spec="" \
+ _pname="";
+ [ "${1}" = "-v" ] && { _verbose=1; shift; }; _prefix="${1}"; shift;
+
while [ ${#} -gt 0 ]; do
case "${1}" in
+ -*)
+ _pname="${1#-}";
+ if [ "${_pname#/}" = "${_pname}" ]; then
+ _pname="${_prefix:+${_prefix}/}${_pname}";
+ fi;
+ if ! rtl_fileop rm "${_pname}"; then
+ return 1;
+ fi; ;;
+
+ !*=*)
+ _file_fname_src="${1#!}"; _file_fname_src="${_file_fname_src%=*}";
+ _file_fname_dst="${1#!}"; _file_fname_dst="${_file_fname_dst#*=}";
+ if [ "${_file_fname_src#/}" = "${_file_fname_src}" ]; then
+ _file_fname_src="${_prefix:+${_prefix}/}${_file_fname_src}";
+ fi;
+ if [ "${_file_fname_dst#/}" = "${_file_fname_dst}" ]; then
+ _file_fname_dst="${_prefix:+${_prefix}/}${_file_fname_dst}";
+ fi;
+ if ! rtl_fileop mv "${_file_fname_src}" "${_file_fname_dst}"; then
+ return 1;
+ fi; ;;
+
+ /=*)
+ _dname="${1#/=}";
+ if [ "${_dname#/}" = "${_dname}" ]; then
+ _dname="${_prefix:+${_prefix}/}${_dname}";
+ fi;
+ if ! rtl_fileop mkdir "${_dname}"; then
+ return 1;
+ fi; ;;
+
@*=*)
- _ln_target="${1%=*}";
- _ln_target="${_ln_target#@}";
- _ln_fname="${1#*=}";
+ _ln_target="${1%=*}"; _ln_target="${_ln_target#@}"; _ln_fname="${1#*=}";
if [ "${_ln_fname#/}" = "${_ln_fname}" ]; then
_ln_fname="${_prefix:+${_prefix}/}${_ln_fname}";
fi;
@@ -22,20 +51,22 @@ rtl_install() {
fi;
if ! rtl_fileop ln_symbolic "${_ln_target}" "${_ln_fname}"; then
return 1;
- fi;
- ;;
- /=*)
- _mkdir_fname="${1#/=}";
- if [ "${_mkdir_fname#/}" = "${_mkdir_fname}" ]; then
- _mkdir_fname="${_prefix:+${_prefix}/}${_mkdir_fname}";
- fi;
- if ! rtl_fileop mkdir "${_mkdir_fname}"; then
+ fi; ;;
+
+ m[0-7][0-7][0-7][0-7]=*)
+ _fname="${1#m[0-7][0-7][0-7][0-7]=}"; _chmod_mode="${1%%=*}"; _chmod_mode="${_chmod_mode#m}";
+ if ! rtl_fileop chmod "${_chmod_mode}" "${_fname}"; then
return 1;
- fi;
- ;;
- *)
- _file_fname_src="${1%=*}";
- _file_fname_dst="${1#*=}";
+ fi; ;;
+
+ o*=*)
+ _fname="${1#o*=}"; _owner_spec="${1%%=*}"; _owner_spec="${_owner_spec#o}";
+ if ! rtl_fileop chown "${_owner_spec}" "${_fname}"; then
+ return 1;
+ fi; ;;
+
+ *=*)
+ _file_fname_src="${1%=*}"; _file_fname_dst="${1#*=}";
if [ "${_file_fname_src#/}" = "${_file_fname_src}" ]; then
_file_fname_src="${_prefix:+${_prefix}/}${_file_fname_src}";
fi;
@@ -44,8 +75,7 @@ rtl_install() {
fi;
if ! rtl_fileop cp "${_file_fname_src}" "${_file_fname_dst}"; then
return 1;
- fi;
- ;;
+ fi; ;;
esac; shift;
done;
};
diff --git a/vars/autoconf_2_64_host.vars b/vars/autoconf_2_64_host.vars
index 35a17bb7..31166de1 100644
--- a/vars/autoconf_2_64_host.vars
+++ b/vars/autoconf_2_64_host.vars
@@ -2,14 +2,37 @@
# set +o errexit -o noglob -o nounset is assumed.
#
-pkg_autoconf_2_64_host_install_make_post() {
+: ${PKG_AUTOCONF_2_64_HOST_INSTALL_FILES:=" \
+ /=libexec/autoconf-2.64 \
+ !bin/autoconf=libexec/autoconf-2.64/ \
+ !bin/autoheader=libexec/autoconf-2.64/ \
+ !bin/autom4te=libexec/autoconf-2.64/ \
+ !bin/autoreconf=libexec/autoconf-2.64/ \
+ !bin/autoscan=libexec/autoconf-2.64/ \
+ !bin/autoupdate=libexec/autoconf-2.64/ \
+ !bin/ifnames=libexec/autoconf-2.64/ \
+ !share/autoconf-2.64/autom4te.cfg=share/autoconf/ \
+ -share/autoconf-2.64/ \
+ !share/autoconf=share/autoconf-2.64/ \
+ -share/info/dir \
+ !share/info/autoconf.info=share/info/autoconf-2.64.info \
+ !share/info/standards.info=share/info/standards-2.64.info \
+ !share/man/man1/autoconf.1=share/man/man1/autoconf-2.64.1 \
+ !share/man/man1/autoheader.1=share/man/man1/autoheader-2.64.1 \
+ !share/man/man1/autom4te.1=share/man/man1/autom4te-2.64.1 \
+ !share/man/man1/autoreconf.1=share/man/man1/autoreconf-2.64.1 \
+ !share/man/man1/autoscan.1=share/man/man1/autoscan-2.64.1 \
+ !share/man/man1/autoupdate.1=share/man/man1/autoupdate-2.64.1 \
+ !share/man/man1/config.guess.1=share/man/man1/config.guess-2.64.1 \
+ !share/man/man1/config.sub.1=share/man/man1/config.sub-2.64.1 \
+ !share/man/man1/ifnames.1=share/man/man1/ifnames-2.64.1 \
+"};
+
+pkg_autoconf_2_64_host_install_files_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
+ for _bin_fname in $(find "${PKG_DESTDIR}/libexec/autoconf-${PKG_VERSION}" -type f -perm /0111); do
+ cat >"${PKG_DESTDIR}/bin/${_bin_fname##*/}-${PKG_VERSION}" <<EOF
#!/bin/sh
export ACLOCAL="\${ACLOCAL:-\${0%/*}/aclocal-1.11}";
export AC_MACRODIR="\${AC_MACRODIR:-\${0%/*}/../share/autoconf-${PKG_VERSION}}";
@@ -24,16 +47,7 @@ export LIBTOOLIZE="\${LIBTOOLIZE:-\${0%/*}/../libexec/autoconf-${PKG_VERSION}/li
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;
+ rtl_fileop chmod 0755 "${PKG_DESTDIR}/bin/${_bin_fname##*/}-${PKG_VERSION}" || return 1;
done;
};