Get rid of the USE_OLD_METHOD hack in mingw-find-debuginfo

This commit is contained in:
Kalev Lember 2012-03-06 19:59:11 +02:00
parent f5e6db3480
commit f3b87dde70
3 changed files with 7 additions and 19 deletions

View File

@ -237,13 +237,8 @@ package or when debugging this package. \
%_mingw32_cmake %{mingw32_cmake}
%_mingw32_description %{mingw32_description}
%_mingw32_debug_package %{mingw32_debug_package}
%_mingw32_debug_install_post %{mingw_debug_install_post}
# The old implementation of the _mingw32_debug_package macro isn't
# forward-compatible with the new implementation using mingw_debug_package
# so keep the old implementation here for backwards compatibility
%_mingw32_debug_install_post \
%{mingw_finddebuginfo} %{_builddir}/%{?buildsubdir} old\
%{nil}
# This macro has been dropped from the new guidelines, keep
# it here around for backwards compatibility

View File

@ -246,6 +246,7 @@ install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/mingw/
%changelog
* Tue Mar 06 2012 Kalev Lember <kalevlember@gmail.com> - 95-3
- Merge copy-n-paste duplicate %%mingw32_debug_package code
- Get rid of the USE_OLD_METHOD hack in mingw-find-debuginfo.sh
* Tue Feb 28 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 95-2
- Fixed broken summary tags

View File

@ -6,8 +6,6 @@ if [ -z "$1" ] ; then BUILDDIR="."
else BUILDDIR=$1
fi
if [ "$2" = "old" ] ; then USE_OLD_METHOD=true; else USE_OLD_METHOD=false; fi
for f in `find $RPM_BUILD_ROOT -type f -name "*.exe" -or -name "*.dll"`
do
case $(mingw-objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
@ -27,14 +25,8 @@ do
popd
done
if [ "$USE_OLD_METHOD" = "true" ] ; then
find $RPM_BUILD_ROOT -type f -name "*.exe.debug" -or -name "*.dll.debug" |
sed -n -e "s#^$RPM_BUILD_ROOT##p" > $BUILDDIR/debugfiles.list
else
shift
for target in $@; do
prefix=`rpm --eval "%{${target}_prefix}"`
find $RPM_BUILD_ROOT$prefix -type f -name "*.exe.debug" -or -name "*.dll.debug" |
sed -n -e "s#^$RPM_BUILD_ROOT##p" > $BUILDDIR/${target}-debugfiles.list
done
fi
for target in $@; do
prefix=`rpm --eval "%{${target}_prefix}"`
find $RPM_BUILD_ROOT$prefix -type f -name "*.exe.debug" -or -name "*.dll.debug" |
sed -n -e "s#^$RPM_BUILD_ROOT##p" > $BUILDDIR/${target}-debugfiles.list
done