From c4c8821145699972f5d1e88e202a080f07325699 Mon Sep 17 00:00:00 2001 From: Brian Cox Date: Sat, 4 Mar 2017 22:56:55 -0800 Subject: [PATCH] Fix install-strip target so it actually strips binaries --- Makefile.am | 1 + Makefile.in | 1 + installer/install.sh | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/Makefile.am b/Makefile.am index 924300c..e0446a1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,6 +3,7 @@ SUBDIRS = man src EXTRA_DIST = COMMERCIAL MAINTAINERS TRADEMARK LICENSE Packaging ReadMe-2.4.3 README.md autogen.sh autogen.sh.README touchconfig.sh contrib policy installer install-data-hook: + export INSTALL_STRIP_FLAG prefix="$(prefix)" sysconfdir="$(sysconfdir)" \ path_to_vi="$(path_to_vi)" path_to_sendmail="$(path_to_sendmail)" \ ./installer/install.sh diff --git a/Makefile.in b/Makefile.in index fd7dc2b..f9e3f25 100644 --- a/Makefile.in +++ b/Makefile.in @@ -798,6 +798,7 @@ uninstall-am: install-data-hook: + export INSTALL_STRIP_FLAG prefix="$(prefix)" sysconfdir="$(sysconfdir)" \ path_to_vi="$(path_to_vi)" path_to_sendmail="$(path_to_sendmail)" \ ./installer/install.sh diff --git a/installer/install.sh b/installer/install.sh index e1d57ab..6957da9 100755 --- a/installer/install.sh +++ b/installer/install.sh @@ -605,6 +605,11 @@ for i in $loosefiles; do fi done +if [ -n "$INSTALL_STRIP_FLAG" ] ; then + echo "INSTALL_STRIP_FLAG is set, stripping binaries" + strip "$TWBIN/siggen" "$TWBIN/tripwire" "$TWBIN/twadmin" "$TWBIN/twprint" +fi + #Make extra sure we don't install the unit test binary to sbin if [ -e "$TWBIN/twtest" ] ; then rm -f "$TWBIN/twtest"