home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 March / PCWELT_3_2006.ISO / base / 05_common.mo / usr / lib / rpm / brp-strip-shared < prev    next >
Encoding:
Text File  |  2003-10-29  |  630 b   |  19 lines

  1. #!/bin/sh
  2. # Conectiva brp - strip shared libraries. Based on Red Hat's brp-strip.
  3. # Thu Apr 20 - Guilherme Manika <gwm@conectiva.com.br>
  4. #              Created file
  5.  
  6. if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
  7.     exit 0
  8. fi
  9.  
  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
  18. done
  19.