2000-10-29 01:30:58 +08:00
|
|
|
#!/bin/sh
|
|
|
|
# Conectiva brp - strip shared libraries. Based on Red Hat's brp-strip.
|
|
|
|
# Thu Apr 20 - Guilherme Manika <gwm@conectiva.com.br>
|
|
|
|
# Created file
|
|
|
|
|
|
|
|
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2005-01-25 13:24:40 +08:00
|
|
|
case `uname -a` in
|
|
|
|
Darwin*) exit 0 ;;
|
|
|
|
*) ;;
|
|
|
|
esac
|
|
|
|
|
2000-10-29 01:30:58 +08:00
|
|
|
# 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 {} \; | \
|
2002-11-16 02:01:47 +08:00
|
|
|
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
|
2000-10-29 01:30:58 +08:00
|
|
|
grep ' shared object,' | \
|
|
|
|
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
|
2005-05-30 14:40:54 +08:00
|
|
|
strip --strip-unneeded "$f"
|
2000-10-29 01:30:58 +08:00
|
|
|
done
|