2 # Conectiva brp - strip shared libraries. Based on Red Hat's brp-strip.
3 # Thu Apr 20 - Guilherme Manika <gwm@conectiva.com.br>
6 if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
10 # Strip ELF shared objects
11 # Please note we don't restrict our search to executable files because
12 # our libraries are not (should not be, at least) +x.
13 for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \
14 grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
15 grep ' shared object,' | \
16 sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
17 strip --strip-unneeded $f