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

Erik van Pienbroek epienbro at fedoraproject.org
Sun Jan 12 18:51:27 UTC 2014


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

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

 mingw-qt5-qtsensors.spec |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/mingw-qt5-qtsensors.spec b/mingw-qt5-qtsensors.spec
index 404176d..fac4b29 100644
--- a/mingw-qt5-qtsensors.spec
+++ b/mingw-qt5-qtsensors.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 - QtSensors component
 
 License:        GPLv3 with exceptions or LGPLv2 with exceptions
@@ -104,9 +104,18 @@ find $RPM_BUILD_ROOT -name "*.prl" -delete
 rm -f $RPM_BUILD_ROOT%{mingw32_libdir}/*.dll
 rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/*.dll
 
+# 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}/Qt5Sensors.dll
 %{mingw32_includedir}/qt5/QtSensors/
 %{mingw32_libdir}/libQt5Sensors.dll.a
@@ -119,7 +128,7 @@ rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/*.dll
 %{mingw32_datadir}/qt5/mkspecs/modules/qt_lib_sensors_private.pri
 
 # Win64
-%files -n mingw64-qt5-%{qt_module}
+%files -n mingw64-qt5-%{qt_module} -f mingw64-qt5-%{qt_module}.excludes
 %{mingw64_bindir}/Qt5Sensors.dll
 %{mingw64_includedir}/qt5/QtSensors/
 %{mingw64_libdir}/libQt5Sensors.dll.a
@@ -133,6 +142,9 @@ rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/*.dll
 
 
 %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