-%if %{?debug:0}%{!?debug:1}
-echo "Strip executable binaries and shared object files."
-filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
-elfexelist=`echo $filelist | xargs -r file | \
- awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
-elfsharedlist=`echo $filelist | xargs -r file | \
- awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
-if [ -n "$elfexelist" ]; then \
- strip -R .note -R .comment $elfexelist
-fi
-if [ -n "$elfsharedlist" ]; then
- strip --strip-unneeded -R .note -R .comment $elfsharedlist
-fi
-%endif
-