diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-05-27 17:01:19 +0100 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-05-27 17:01:19 +0100 |
commit | 00ef8a7a1d4f930570068ddc5487e58263a14543 (patch) | |
tree | 3e3bef76cb9c25afb797f3e96d0f053152156681 /subr | |
parent | 75bb816a000a1b5a6b4fcebecc82f59d785da83a (diff) | |
download | midipix_build-00ef8a7a1d4f930570068ddc5487e58263a14543.tar.bz2 midipix_build-00ef8a7a1d4f930570068ddc5487e58263a14543.tar.xz |
subr/pkg_install_files.subr:pkgp_install_files_strip(): strip minipix packages unless --debug-minipix was specified (via midipix.)
Diffstat (limited to 'subr')
-rw-r--r-- | subr/pkg_install_files.subr | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/subr/pkg_install_files.subr b/subr/pkg_install_files.subr index 7bfedb77..03eedff5 100644 --- a/subr/pkg_install_files.subr +++ b/subr/pkg_install_files.subr @@ -47,22 +47,26 @@ pkgp_install_files_pkgconfig() { }; pkgp_install_files_strip() { - local _bin_path="" _tree_root="${PKG_DESTDIR}"; - if [ -e "${_tree_root}" ]\ - && [ "${BUILD_KIND}" = release ]\ - && [ "${PKG_BUILD_TYPE}" = native ]; then - if [ "${PKG_NAME%_minipix}" != "${PKG_NAME}" ]\ - && [ "${ARG_DEBUG_MINIPIX:-0}" -eq 1 ]; then - return 0; + local _bin_path="" _stripfl=0 _tree_root="${PKG_DESTDIR}"; + if [ -e "${_tree_root}" ]; then + if rtl_match "${PKG_NAME}" "*_minipix"; then + : $((_stripfl=(${ARG_DEBUG_MINIPIX:-0} ? 0 : 1))); + elif [ "${BUILD_KIND}" = release ]\ + && [ "${PKG_BUILD_TYPE}" = native ]; then + _stripfl=1; + else + _stripfl=0; fi; - for _bin_path in $(find "${_tree_root}" -perm /a=x -type f); do - if objdump -sj .debug_frame -j .debug_info "${_bin_path}" >/dev/null 2>&1; then - rtl_log_msg info "Stripping %s..." "${_bin_path}"; - if ! "${PKG_TARGET}-strip" "${_bin_path}"; then - return 1; + if [ "${_stripfl:-0}" -eq 1 ]; then + for _bin_path in $(find "${_tree_root}" -perm /a=x -type f); do + if objdump -sj .debug_frame -j .debug_info "${_bin_path}" >/dev/null 2>&1; then + rtl_log_msg info "Stripping %s..." "${_bin_path}"; + if ! "${PKG_TARGET}-strip" "${_bin_path}"; then + return 1; + fi; fi; - fi; - done; + done; + fi; fi; }; |