From dec48cfa66e17ba4a7e50c92cb24b913289feb12 Mon Sep 17 00:00:00 2001 From: Kim Kibum Date: Mon, 21 May 2012 17:49:08 +0900 Subject: Upload Tizen:Base source --- scripts/brp-strip-shared | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 scripts/brp-strip-shared (limited to 'scripts/brp-strip-shared') diff --git a/scripts/brp-strip-shared b/scripts/brp-strip-shared new file mode 100644 index 0000000..da46431 --- /dev/null +++ b/scripts/brp-strip-shared @@ -0,0 +1,25 @@ +#!/bin/sh +# Conectiva brp - strip shared libraries. Based on Red Hat's brp-strip. +# Thu Apr 20 - Guilherme Manika +# Created file + +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +STRIP=${1:-strip} + +case `uname -a` in +Darwin*) exit 0 ;; +*) ;; +esac + +# Strip ELF shared objects +# Please note we don't restrict our search to executable files because +# our libraries are not (should not be, at least) +x. +for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \ + 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" +done -- cgit v1.2.3