Make use of build tuple variables
OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-filesystem?expand=0&rev=77
This commit is contained in:
parent
49d1f05cab
commit
5d0a018ef8
@ -1,17 +1,18 @@
|
||||
#!/bin/sh
|
||||
#mingw64_find-debuginfo.sh - automagically generate debug info and file list
|
||||
#for inclusion in an rpm spec file for mingw64-* packages.
|
||||
target="mingw64"
|
||||
host="x86_64-w64-mingw32"
|
||||
|
||||
if [ -z "$1" ] ; then BUILDDIR="."
|
||||
else BUILDDIR=$1
|
||||
fi
|
||||
|
||||
SYMBOL_DIR="/usr/x86_64-w64-mingw32/sys-root/mingw/symbols"
|
||||
|
||||
SYMBOL_DIR="/usr/$host/sys-root/mingw/symbols"
|
||||
|
||||
for f in `find $RPM_BUILD_ROOT -type f -name "*.exe" -or -name "*.dll"`
|
||||
do
|
||||
case $(x86_64-w64-mingw32-objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
|
||||
case $("$host-objdump" -h "$f" 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
|
||||
*debuglink*) continue ;;
|
||||
*debug*) ;;
|
||||
*gnu.version*)
|
||||
@ -24,11 +25,11 @@ do
|
||||
echo extracting debug info from $f
|
||||
|
||||
# breakpad symbols
|
||||
x86_64-w64-mingw32-gen_sym_files $f $RPM_BUILD_ROOT$SYMBOL_DIR
|
||||
"$host-gen_sym_files" "$f" "$RPM_BUILD_ROOT$SYMBOL_DIR"
|
||||
|
||||
x86_64-w64-mingw32-objcopy --only-keep-debug $f $f.debug || :
|
||||
"$host-objcopy" --only-keep-debug "$f" "$f.debug" || :
|
||||
pushd `dirname $f`
|
||||
x86_64-w64-mingw32-objcopy --add-gnu-debuglink=`basename $f.debug` --strip-unneeded `basename $f` || :
|
||||
"$host-objcopy" --add-gnu-debuglink=`basename "$f.debug"` --strip-unneeded `basename "$f"` || :
|
||||
popd
|
||||
done
|
||||
|
||||
@ -37,8 +38,8 @@ find $RPM_BUILD_ROOT -type f \
|
||||
-or -name "*.dll.debug" \
|
||||
-or -name "*.exe.mdb" \
|
||||
-or -name "*.dll.mdb" \
|
||||
| sed -n -e "s#^$RPM_BUILD_ROOT##p" > $BUILDDIR/debugfiles.list
|
||||
| sed -n -e "s#^$RPM_BUILD_ROOT##p" >"$BUILDDIR/$target-debugfiles.list"
|
||||
|
||||
if [ -e "$RPM_BUILD_ROOT/$SYMBOL_DIR" ]; then
|
||||
echo "$SYMBOL_DIR" >>"$BUILDDIR/debugfiles.list"
|
||||
echo "$SYMBOL_DIR" >>"$BUILDDIR/$target-debugfiles.list"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user