2003-01-09 05:37:01 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2010-01-27 15:40:15 +08:00
|
|
|
STRIP=${1:-strip}
|
2019-04-15 21:46:09 +08:00
|
|
|
NCPUS=${RPM_BUILD_NCPUS:-1}
|
2010-01-27 15:40:15 +08:00
|
|
|
|
2005-01-25 13:24:40 +08:00
|
|
|
case `uname -a` in
|
|
|
|
Darwin*) exit 0 ;;
|
|
|
|
*) ;;
|
|
|
|
esac
|
|
|
|
|
2003-01-09 05:37:01 +08:00
|
|
|
# Strip static libraries.
|
2019-05-02 23:17:56 +08:00
|
|
|
find "$RPM_BUILD_ROOT" -type f | \
|
|
|
|
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
|
2019-06-26 00:04:20 +08:00
|
|
|
xargs -d '\n' -r -P$NCPUS -n32 sh -c "file \"\$@\" | sed 's/: */: /' | grep 'current ar archive' | sed -n -e 's/^\(.*\):[ ]*current ar archive/\1/p' | xargs -d '\n' -I\{\} $STRIP -g \{\}" ARG0
|