aboutsummaryrefslogtreecommitdiffstats
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
parent0b7565a123814e1deceea3fc9f06e8d5490766cb (diff)
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.
-rw-r--r--NEWS3
-rw-r--r--build.macros.in10
2 files changed, 13 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 7bc267b..888e835 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- 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
+
Version 2.36 - 24 September 2018, by Thierry Vignaud
- add __brp_mangle_shebangs in order to fix /bin -> /usr/bin & "env foobar"
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} \