diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2019-01-19 14:38:21 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2019-01-19 15:28:07 +0000 |
commit | d279a98da1aae886a4b4201122ce5614a185f008 (patch) | |
tree | 0800eca320fced59a554b02507cc009c555407f3 /subr/pkg_install_strip.subr | |
parent | e402f659b8e40a27d6ce64ea1a8f08be9f28c848 (diff) | |
download | midipix_build-d279a98da1aae886a4b4201122ce5614a185f008.tar.bz2 midipix_build-d279a98da1aae886a4b4201122ce5614a185f008.tar.xz |
etc/build.usage, subr/build_{args,checks}.subr: merges -c into -C as -C prefix.
etc/build.usage, subr/build_{args,init}.subr: merges -[46N] into -F as ipv4|ipv6|offline.
subr/ex_rtl_fetch.subr: honour ${{ARG_FETCH_FORCE,DEFAULT_GIT_ARGS}}.
subr/pkg_install_strip.subr: correctly strip non-release build binaries.
subr/pkg_install_strip.subr:pkg_install_strip(): honour ${ARG_DEBUG_MINIPIX}.
vars/env.vars, subr/pkg_fetch_{download,git,wget}.subr: merges fetch_{git,wget} into fetch_download.
vars/midipix.vars: adds ${DEFAULT_GIT_ARGS}.
vars/{musl,python[23]{,_host}}.vars: updated concerning fetch_download.
Diffstat (limited to 'subr/pkg_install_strip.subr')
-rw-r--r-- | subr/pkg_install_strip.subr | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/subr/pkg_install_strip.subr b/subr/pkg_install_strip.subr index 2709e77d..5b34d70e 100644 --- a/subr/pkg_install_strip.subr +++ b/subr/pkg_install_strip.subr @@ -2,19 +2,23 @@ # set -o errexit -o noglob are assumed. # -pkg_strip() { - local _tree_root="${PKG_DESTDIR}/bin" _bin_path=""; - if [ ! -e "${_tree_root}" ]; then - return; - fi; - for _bin_path in $(find "${_tree_root}" -perm /a=x \ - \( -type f -or -type l \)); do - if objdump -sj .debug_info "${_bin_path}" >/dev/null 2>&1; then - ex_rtl_log_msg info "Stripping ${_bin_path}..."; - ex_rtl_log_msg vnfo "${PKG_TARGET}-strip ${_bin_path}"; - ${PKG_TARGET}-strip ${_bin_path}; +pkg_install_strip() { + local _tree_root="${PKG_DESTDIR}" _bin_path=""; + if [ -e "${_tree_root}" ]\ + && [ "${BUILD}" != release ]; then + if [ "${PKG_NAME%_minipix}" != "${PKG_NAME}" ]\ + && [ "${ARG_DEBUG_MINIPIX:-0}" -eq 1 ]; then + return; fi; - done; + for _bin_path in $(find "${_tree_root}" -perm /a=x \ + \( -type f -or -type l \)); do + if objdump -sj .debug_info "${_bin_path}" >/dev/null 2>&1; then + ex_rtl_log_msg info "Stripping ${_bin_path}..."; + ex_rtl_log_msg vnfo "${PKG_TARGET}-strip ${_bin_path}"; + ${PKG_TARGET}-strip ${_bin_path}; + fi; + done; + fi; }; # vim:filetype=sh |