%{__arch_install_post}\
%{__os_install_post}\
%{nil}
---- rpm-4.4.9.orig/scripts/find-debuginfo.sh 2006-02-12 16:59:51.000000000 +0200
-+++ rpm-4.4.9/scripts/find-debuginfo.sh 2008-01-31 19:20:50.852568146 +0200
-@@ -1,36 +1,49 @@
+--- rpm-4.5.debuginfo/scripts/find-debuginfo.sh 2007-08-31 04:07:02.000000000 +0300
++++ rpm-4.5/scripts/find-debuginfo.sh 2008-10-05 00:49:03.834523059 +0300
+@@ -1,36 +1,54 @@
#!/bin/sh
-#find-debuginfo.sh - automagically generate debug info and file list
-#for inclusion in an rpm spec file.
+ 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
+ [ -f "$debugfn" ] && continue
echo extracting debug info from $f
-- /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f"
-+ /usr/bin/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$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.
-@@ -38,20 +51,27 @@
+@@ -38,20 +56,21 @@
/usr/lib/debug/*) continue ;;
esac
+find $RPM_BUILD_ROOT/usr/lib/debug -type f | sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE
+find $RPM_BUILD_ROOT/usr/lib/debug -mindepth 1 -type d | sed -n -e "s#^$RPM_BUILD_ROOT#%dir #p" >> $LISTFILE
+find $RPM_BUILD_ROOT/usr/src/debug -mindepth 1 -maxdepth 1 | sed -n -e "s#^$RPM_BUILD_ROOT##p" >> $LISTFILE
-+
-+# add dirs already in filesystem-debuginfo package to exclude
-+cat /usr/src/debug/filesystem-debuginfo.files | while read dir; do
-+ [ -d $RPM_BUILD_ROOT$dir ] || continue
-+ echo "%exclude %dir $dir"
-+done >> $LISTFILE
---- rpm-4.4.9.orig/scripts/find-debuginfo.sh 2008-02-11 18:51:12.304461614 +0200
-+++ rpm-4.4.9/scripts/find-debuginfo.sh 2008-02-11 18:50:17.000000000 +0200
-@@ -20,6 +20,11 @@
- 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