Author: epienbro
Update of /cvs/pkgs/rpms/mingw32-filesystem/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16863
Modified Files:
macros.mingw32 mingw32-filesystem.spec
Added Files:
mingw32-find-debuginfo.sh
Log Message:
- 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}
--- NEW FILE mingw32-find-debuginfo.sh ---
#!/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
Index: macros.mingw32
===================================================================
RCS file: /cvs/pkgs/rpms/mingw32-filesystem/devel/macros.mingw32,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- macros.mingw32 9 Jun 2009 08:44:18 -0000 1.4
+++ macros.mingw32 22 Jun 2009 10:18:35 -0000 1.5
@@ -52,6 +52,24 @@
%_mingw32_findprovides /usr/lib/rpm/mingw32-find-provides.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; \
PKG_CONFIG_LIBDIR="%{_mingw32_libdir}/pkgconfig"; export PKG_CONFIG_LIBDIR; \
Index: mingw32-filesystem.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mingw32-filesystem/devel/mingw32-filesystem.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- mingw32-filesystem.spec 9 Jun 2009 08:44:18 -0000 1.23
+++ mingw32-filesystem.spec 22 Jun 2009 10:18:35 -0000 1.24
@@ -1,7 +1,7 @@
%define debug_package %{nil}
Name: mingw32-filesystem
-Version: 51
+Version: 52
Release: 1%{?dist}
Summary: MinGW base filesystem and environment
@@ -20,6 +20,7 @@ Source5: mingw32-find-provides.sh
Source6: mingw32-scripts.sh
Source7: mingw32-rpmlint.config
Source8: Toolchain-mingw32.cmake
+Source9: mingw32-find-debuginfo.sh
Requires: setup
Requires: rpm
@@ -137,11 +138,11 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-
mkdir -p $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 %{SOURCE9} $RPM_BUILD_ROOT/usr/lib/rpm
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mingw32
install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/mingw32
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -164,6 +165,13 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Jun 22 2009 Erik van Pienbroek <epienbro(a)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(a)spicenitz.org> - 51-1
- Add CMake rules