home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / usr / lib / rpm / brp-strip-shared < prev    next >
Text File  |  2006-11-29  |  682b  |  24 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. case `uname -a` in
  11. Darwin*) exit 0 ;;
  12. *) ;;
  13. esac
  14.  
  15. # Strip ELF shared objects
  16. # Please note we don't restrict our search to executable files because
  17. # our libraries are not (should not be, at least) +x.
  18. for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \
  19.         grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"  | \
  20.     grep ' shared object,' | \
  21.     sed -n -e 's/^\(.*\):[     ]*ELF.*, not stripped/\1/p'`; do
  22.     strip --strip-unneeded "$f"
  23. done
  24.