redhat-rpm-config/brp-strip
Alexander Larsson 27ac1446b0 Make brp-strip* not strip debug objects
Add a _enable_debug_packages macro (commented out)
2002-11-20 16:55:36 +00:00

14 lines
433 B
Bash
Executable File

#!/bin/sh
# If using normal root, avoid changing anything.
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
exit 0
fi
# Strip ELF binaries
for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
grep -v ' shared object,' | \
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
strip -g $f || :
done