aboutsummaryrefslogtreecommitdiffstats
path: root/build.macros.in
diff options
context:
space:
mode:
authorJani Välimaa <wally@mageia.org>2018-10-21 10:33:41 +0300
committerJani Välimaa <wally@mageia.org>2018-10-21 10:33:41 +0300
commit72c311efdca1fd3866a90175ddbb79f4c4436c62 (patch)
tree52019fdce42f6ae5739a2ee4fdba257033422b35 /build.macros.in
parent0b7565a123814e1deceea3fc9f06e8d5490766cb (diff)
downloadrpm-setup-72c311efdca1fd3866a90175ddbb79f4c4436c62.tar
rpm-setup-72c311efdca1fd3866a90175ddbb79f4c4436c62.tar.gz
rpm-setup-72c311efdca1fd3866a90175ddbb79f4c4436c62.tar.bz2
rpm-setup-72c311efdca1fd3866a90175ddbb79f4c4436c62.tar.xz
rpm-setup-72c311efdca1fd3866a90175ddbb79f4c4436c62.zip
Strip binaries and libraries in __os_install_post if __debug_package isn't defined
Add __brp_strip, __brp_strip_comment_note, __brp_strip_static_archive and __brp_strip_shared for stripping. One can skip stripping by using '%define __strip %{_bindir}/true' in .spec, if needed.
Diffstat (limited to 'build.macros.in')
-rw-r--r--build.macros.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/build.macros.in b/build.macros.in
index 743258f..fd03706 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -451,6 +451,10 @@ fi
#---------------------------------------------------------------------
# Expanded at end of %install scriptlet.
+%__brp_strip /usr/lib/rpm/brp-strip %{__strip}
+%__brp_strip_comment_note /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump}
+%__brp_strip_static_archive /usr/lib/rpm/brp-strip-static-archive %{__strip}
+%__brp_strip_shared /usr/lib/rpm/brp-strip-shared %{__strip}
%__brp_python_bytecompile /usr/lib/rpm/brp-python-bytecompile "%{__python}" "%{?_python_bytecompile_errors_terminate_build}" "%{?_python_bytecompile_extra}"
%__brp_python_hardlink /usr/lib/rpm/brp-python-hardlink
# __brp_mangle_shebangs_exclude - shebangs to exclude
@@ -461,6 +465,12 @@ fi
%__os_install_post \
%{?__spec_helper_post}%{?!__spec_helper_post:/usr/share/spec-helper/spec-helper} \
+ %{!?__debug_package:\
+ %{?__brp_strip} \
+ %{?__brp_strip_comment_note} \
+ %{?__brp_strip_static_archive} \
+ %{?__brp_strip_shared} \
+ } \
%{?py_auto_byte_compile:%{?__brp_python_bytecompile}} \
%{?__brp_python_hardlink} \
%{?__brp_mangle_shebangs} \