%__os_install_post \
%{_rpmconfigdir}/brp-compress \
- %{_rpmconfigdir}/brp-strip \
- %{_rpmconfigdir}/brp-strip-static-archive \
- %{_rpmconfigdir}/brp-strip-comment-note \
+ %{_rpmconfigdir}/brp-strip %{__strip} \
+ %{_rpmconfigdir}/brp-strip-static-archive %{__strip} \
+ %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \
%{nil}
%__spec_install_post\
exit 0
fi
+STRIP=${1:-strip}
+
case `uname -a` in
Darwin*) exit 0 ;;
*) ;;
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
grep -v ' shared object,' | \
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
- strip -g "$f" || :
+ $STRIP -g "$f" || :
done
exit 0
fi
+STRIP=${1:-strip}
+OBJDUMP=${2:-objdump}
+
case `uname -a` in
Darwin*) exit 0 ;;
*) ;;
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do
note="-R .note"
- if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
+ if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
grep ALLOC >/dev/null; then
note=
fi
- strip -R .comment $note "$f" || :
+ $STRIP -R .comment $note "$f" || :
done
exit 0
fi
+STRIP=${1:-strip}
+
case `uname -a` in
Darwin*) exit 0 ;;
*) ;;
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
grep ' shared object,' | \
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
- strip --strip-unneeded "$f"
+ $STRIP --strip-unneeded "$f"
done
exit 0
fi
+STRIP=${1:-strip}
+
case `uname -a` in
Darwin*) exit 0 ;;
*) ;;
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
grep 'current ar archive' | \
sed -n -e 's/^\(.*\):[ ]*current ar archive/\1/p'`; do
- strip -g "$f"
+ $STRIP -g "$f"
done