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
17 # Strip ELF shared objects
18 # Please note we don't restrict our search to executable files because
19 # our libraries are not (should not be, at least) +x.
20 for f in `find "$RPM_BUILD_ROOT" -type f -a -exec file {} \; | \
21 grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
22 grep ' shared object,' | \
23 sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p'`; do
24 $STRIP --strip-unneeded "$f"