%{__arch_install_post}\
%{__os_install_post}\
%{nil}
---- rpm-4.5/scripts/find-debuginfo.sh 2008-05-22 14:11:01.000000000 +0300
-+++ rpm-4.5/scripts/find-debuginfo.sh 2008-08-27 21:28:20.669206923 +0300
-@@ -1,32 +1,50 @@
- #!/bin/sh
--#find-debuginfo.sh - automagically generate debug info and file list
--#for inclusion in an rpm spec file.
-+# find-debuginfo.sh - automagically generate debug info and file list
-+# for inclusion in an rpm spec file.
-
--if [ -z "$1" ] ; then BUILDDIR="."
--else BUILDDIR=$1
-+if [ -z "$1" ]; then
-+ BUILDDIR="."
-+else
-+ BUILDDIR=$1
- fi
-
- LISTFILE=$BUILDDIR/debugfiles.list
- SOURCEFILE=$BUILDDIR/debugsources.list
-
--debugdir="${RPM_BUILD_ROOT}/usr/lib/debug"
--
--echo -n > $SOURCEFILE
-+: > $SOURCEFILE
-+: > $LISTFILE
-
- strip_to_debug()
- {
-- eu-strip --remove-comment -f "$1" "$2" || :
-+ objcopy --only-keep-debug --remove-section .comment "$2" "$1"
-+ objcopy --add-gnu-debuglink="$1" "$2"
- }
-
-+if [ ! -d $RPM_BUILD_ROOT ]; then
-+ # no buildroot, exit
-+ exit 0
-+fi
-+
-+filelist=$(find $RPM_BUILD_ROOT ! -path "$RPM_BUILD_ROOT/usr/lib/debug/*.debug" -type f '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')')
-+if [ -z "$filelist" ]; then
-+ # no files, exit
-+ exit 0
-+fi
-+
-+filetypes=$(echo "$filelist" | xargs -r -d'\n' file)
-+elflist=$(echo "$filetypes" | awk -F: '/ELF.*, not stripped/ {print $1}')
-+if [ -z "$elflist" ]; then
-+ # no elf objects, exit
-+ exit 0
-+fi
-+
- # Strip ELF binaries
--for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
-- sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p'`
--do
-- dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p")
-- bn=$(basename $f .debug).debug
--
-- debugdn="${debugdir}${dn}"
-- debugfn="${debugdn}/${bn}"
-- [ -f "${debugfn}" ] && continue
-+echo "$elflist" | while read f; do
-+ dn=$(dirname "${f#$RPM_BUILD_ROOT}")
-+ bn=$(basename "$f" .debug).debug
-+
-+ debugdn="$RPM_BUILD_ROOT/usr/lib/debug$dn"
-+ debugfn="$debugdn/$bn"
-+ [ -f "$debugfn" ] && continue
-
- echo extracting debug info from $f
-@@ -37,7 +55,7 @@
- [ -f "$debugfn" ] && continue
-
- echo extracting debug info from $f
-- /usr/lib/rpm/4.5/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f"
-+ /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f"
-
- # A binary already copied into /usr/lib/debug doesn't get stripped,
- # just has its file names collected and adjusted.