[mingw-qt5-qtquick1] Don't carry .dll.debug files in main package

Erik van Pienbroek epienbro at fedoraproject.org
Sun Jan 12 18:36:01 UTC 2014


commit 05963c5574727a3a5bbbed103a6ad790b351a8ad
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Sun Jan 12 19:36:10 2014 +0100

    Don't carry .dll.debug files in main package

 mingw-qt5-qtquick1.spec |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/mingw-qt5-qtquick1.spec b/mingw-qt5-qtquick1.spec
index e4e1610..1a26c5f 100644
--- a/mingw-qt5-qtquick1.spec
+++ b/mingw-qt5-qtquick1.spec
@@ -17,7 +17,7 @@
 
 Name:           mingw-qt5-%{qt_module}
 Version:        5.2.0
-Release:        2%{?pre:.%{pre}}%{?snapshot_date:.git%{snapshot_date}.%{snapshot_rev}}%{?dist}
+Release:        3%{?pre:.%{pre}}%{?snapshot_date:.git%{snapshot_date}.%{snapshot_rev}}%{?dist}
 Summary:        Qt5 for Windows - QtQuick1 component
 
 License:        GPLv3 with exceptions or LGPLv2 with exceptions
@@ -110,9 +110,18 @@ rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/*.dll
 mv $RPM_BUILD_ROOT%{mingw32_bindir}/qmlviewer.exe $RPM_BUILD_ROOT%{mingw32_bindir}/qmlviewer-qt5.exe
 mv $RPM_BUILD_ROOT%{mingw64_bindir}/qmlviewer.exe $RPM_BUILD_ROOT%{mingw64_bindir}/qmlviewer-qt5.exe
 
+# Create a list of .dll.debug files which need to be excluded from the main packages
+# We do this to keep the %%files section as clean/readable as possible (otherwise every
+# single file and directory would have to be mentioned individually in the %%files section)
+# Note: the .dll.debug files aren't created yet at this point (as it happens after
+# the %%install section). Therefore we have to assume that all .dll files will
+# eventually get a .dll.debug counterpart
+find $RPM_BUILD_ROOT%{mingw32_prefix} | grep .dll | sed s@"^$RPM_BUILD_ROOT"@"%%exclude "@ | sed s/".dll\$"/".dll.debug"/ > mingw32-qt5-%{qt_module}.excludes
+find $RPM_BUILD_ROOT%{mingw64_prefix} | grep .dll | sed s@"^$RPM_BUILD_ROOT"@"%%exclude "@ | sed s/".dll\$"/".dll.debug"/ > mingw64-qt5-%{qt_module}.excludes
+
 
 # Win32
-%files -n mingw32-qt5-%{qt_module}
+%files -n mingw32-qt5-%{qt_module} -f mingw32-qt5-%{qt_module}.excludes
 %{mingw32_bindir}/Qt5Declarative.dll
 %{mingw32_bindir}/qml1plugindump.exe
 %{mingw32_bindir}/qmlviewer-qt5.exe
@@ -129,7 +138,7 @@ mv $RPM_BUILD_ROOT%{mingw64_bindir}/qmlviewer.exe $RPM_BUILD_ROOT%{mingw64_bindi
 %{mingw32_datadir}/qt5/mkspecs/modules/qt_lib_declarative_private.pri
 
 # Win64
-%files -n mingw64-qt5-%{qt_module}
+%files -n mingw64-qt5-%{qt_module} -f mingw64-qt5-%{qt_module}.excludes
 %{mingw64_bindir}/Qt5Declarative.dll
 %{mingw64_bindir}/qml1plugindump.exe
 %{mingw64_bindir}/qmlviewer-qt5.exe
@@ -147,6 +156,9 @@ mv $RPM_BUILD_ROOT%{mingw64_bindir}/qmlviewer.exe $RPM_BUILD_ROOT%{mingw64_bindi
 
 
 %changelog
+* Sun Jan 12 2014 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.2.0-3
+- Don't carry .dll.debug files in main package
+
 * Wed Jan  8 2014 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.2.0-2
 - Dropped manual rename of import libraries
 


More information about the scm-commits mailing list