- Add script to create -debuginfo subpackages This script was created by
Fridrich Strba - All mingw32 packages now need to add these lines to their .spec files: %define __os_install_post %{_mingw32_debug_install_post} %{_mingw32_debug_package}
This commit is contained in:
parent
7cf0edd56a
commit
d9bad00f48
@ -52,6 +52,24 @@
|
|||||||
|
|
||||||
%_mingw32_findprovides /usr/lib/rpm/mingw32-find-provides.sh
|
%_mingw32_findprovides /usr/lib/rpm/mingw32-find-provides.sh
|
||||||
%_mingw32_findrequires /usr/lib/rpm/mingw32-find-requires.sh
|
%_mingw32_findrequires /usr/lib/rpm/mingw32-find-requires.sh
|
||||||
|
%_mingw32_finddebuginfo /usr/lib/rpm/mingw32-find-debuginfo.sh
|
||||||
|
|
||||||
|
%_mingw32_debug_install_post \
|
||||||
|
/usr/lib/rpm/mingw32-find-debuginfo.sh %{_builddir}/%{?buildsubdir}\
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
# Template for debug sub-package.
|
||||||
|
%_mingw32_debug_package(n:) \
|
||||||
|
%package %{-n:-n %{-n*}-}debuginfo \
|
||||||
|
Summary: Debug information for package %{name} \
|
||||||
|
Group: Development/debug \
|
||||||
|
%description %{-n:-n %{-n*}-}debuginfo \
|
||||||
|
This package provides debug information for package %{name}.\
|
||||||
|
Debug information is useful when developing applications that use this\
|
||||||
|
package or when debugging this package.\
|
||||||
|
%files debuginfo -f debugfiles.list\
|
||||||
|
%defattr(-,root,root,-)\
|
||||||
|
%{nil}
|
||||||
|
|
||||||
%_mingw32_env HOST_CC=gcc; export HOST_CC; \
|
%_mingw32_env HOST_CC=gcc; export HOST_CC; \
|
||||||
PKG_CONFIG_LIBDIR="%{_mingw32_libdir}/pkgconfig"; export PKG_CONFIG_LIBDIR; \
|
PKG_CONFIG_LIBDIR="%{_mingw32_libdir}/pkgconfig"; export PKG_CONFIG_LIBDIR; \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
Name: mingw32-filesystem
|
Name: mingw32-filesystem
|
||||||
Version: 51
|
Version: 52
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: MinGW base filesystem and environment
|
Summary: MinGW base filesystem and environment
|
||||||
|
|
||||||
@ -20,6 +20,7 @@ Source5: mingw32-find-provides.sh
|
|||||||
Source6: mingw32-scripts.sh
|
Source6: mingw32-scripts.sh
|
||||||
Source7: mingw32-rpmlint.config
|
Source7: mingw32-rpmlint.config
|
||||||
Source8: Toolchain-mingw32.cmake
|
Source8: Toolchain-mingw32.cmake
|
||||||
|
Source9: mingw32-find-debuginfo.sh
|
||||||
|
|
||||||
Requires: setup
|
Requires: setup
|
||||||
Requires: rpm
|
Requires: rpm
|
||||||
@ -137,11 +138,11 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man{
|
|||||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm
|
||||||
install -m 0755 mingw32-find-requires.sh $RPM_BUILD_ROOT/usr/lib/rpm
|
install -m 0755 mingw32-find-requires.sh $RPM_BUILD_ROOT/usr/lib/rpm
|
||||||
install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm
|
install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm
|
||||||
|
install -m 0755 %{SOURCE9} $RPM_BUILD_ROOT/usr/lib/rpm
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mingw32
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mingw32
|
||||||
install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/mingw32
|
install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/mingw32
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
@ -164,6 +165,13 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 22 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 52-0
|
||||||
|
- Add script to create -debuginfo subpackages
|
||||||
|
This script was created by Fridrich Strba
|
||||||
|
- All mingw32 packages now need to add these lines to their .spec files:
|
||||||
|
%%define __os_install_post %%{_mingw32_debug_install_post}
|
||||||
|
%%{_mingw32_debug_package}
|
||||||
|
|
||||||
* Thu Jun 4 2009 Adam Goode <adam@spicenitz.org> - 51-1
|
* Thu Jun 4 2009 Adam Goode <adam@spicenitz.org> - 51-1
|
||||||
- Add CMake rules
|
- Add CMake rules
|
||||||
|
|
||||||
|
31
mingw32-find-debuginfo.sh
Executable file
31
mingw32-find-debuginfo.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#mingw32_find-debuginfo.sh - automagically generate debug info and file list
|
||||||
|
#for inclusion in an rpm spec file for mingw32-* packages.
|
||||||
|
|
||||||
|
if [ -z "$1" ] ; then BUILDDIR="."
|
||||||
|
else BUILDDIR=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for f in `find $RPM_BUILD_ROOT -type f -name "*.exe" -or -name "*.dll"`
|
||||||
|
do
|
||||||
|
case $(i686-pc-mingw32-objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
|
||||||
|
*debuglink*) continue ;;
|
||||||
|
*debug*) ;;
|
||||||
|
*gnu.version*)
|
||||||
|
echo "WARNING: "`echo $f | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!"
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
*) continue ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo extracting debug info from $f
|
||||||
|
i686-pc-mingw32-objcopy --only-keep-debug $f $f.debug || :
|
||||||
|
pushd `dirname $f`
|
||||||
|
i686-pc-mingw32-objcopy --add-gnu-debuglink=`basename $f.debug` --strip-unneeded `basename $f` || :
|
||||||
|
popd
|
||||||
|
done
|
||||||
|
|
||||||
|
find $RPM_BUILD_ROOT -type f -name "*.exe.debug" -or -name "*.dll.debug" |
|
||||||
|
sed -n -e "s#^$RPM_BUILD_ROOT##p" > $BUILDDIR/debugfiles.list
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user