From 9febbfea473ca3cb850af65d10a1ef2e808f72bd Mon Sep 17 00:00:00 2001 From: Felipe Borges Date: Mon, 21 Oct 2019 12:09:09 +0200 Subject: [PATCH] Install FindQuaZip.cmake in the right prefix This was proposed upstream in https://github.com/stachenov/quazip/pull/20 For context: we are building Flatpaks from RPMs[0], and Quazip gets pulled in as dependency for keepassxc. [0] https://docs.fedoraproject.org/en-US/flatpak/tutorial/ Fixes rhbz#1761528 --- quazip-0.7.6-install-right-prefix.patch | 22 ++++++++++++++++++++++ quazip.spec | 10 +++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 quazip-0.7.6-install-right-prefix.patch diff --git a/quazip-0.7.6-install-right-prefix.patch b/quazip-0.7.6-install-right-prefix.patch new file mode 100644 index 0000000..39946ff --- /dev/null +++ b/quazip-0.7.6-install-right-prefix.patch @@ -0,0 +1,22 @@ +From f323e478b1c05f470393bb57b486c0d871cf4736 Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Thu, 31 Jan 2019 18:19:30 +0100 +Subject: [PATCH] Install the FindQuaZip.cmake in the right prefix + +It should go wherever CMAKE_INSTALL_PREFIX is installing. +This fixes the build on flatpak and should also fix it for other cross +compilation setups. +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 539caa4..a43fefe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,4 +60,4 @@ set(QUAZIP_LIB_TARGET_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX} CACHE + + add_subdirectory(quazip) + +-install(FILES FindQuaZip.cmake RENAME FindQuaZip${QUAZIP_LIB_VERSION_SUFFIX}.cmake DESTINATION ${CMAKE_ROOT}/Modules) ++install(FILES FindQuaZip.cmake RENAME FindQuaZip${QUAZIP_LIB_VERSION_SUFFIX}.cmake DESTINATION share/cmake) diff --git a/quazip.spec b/quazip.spec index 748fbeb..1f5e37f 100644 --- a/quazip.spec +++ b/quazip.spec @@ -1,11 +1,12 @@ Name: quazip Version: 0.7.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Qt/C++ wrapper for the minizip library License: GPLv2+ or LGPLv2+ URL: https://github.com/stachenov/quazip Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: quazip-0.7.6-fix_static.patch +Patch1: quazip-0.7.6-install-right-prefix.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: qt4-devel @@ -96,7 +97,7 @@ make install/fast DESTDIR=%{buildroot} -C build-qt4 %doc doc/html %{_includedir}/quazip/ %{_libdir}/libquazip.so -%{_datadir}/cmake/Modules/FindQuaZip.cmake +%{_datadir}/cmake/FindQuaZip.cmake %files qt5 %doc NEWS.txt README.md @@ -107,10 +108,13 @@ make install/fast DESTDIR=%{buildroot} -C build-qt4 %doc doc/html %{_includedir}/quazip5/ %{_libdir}/libquazip5.so -%{_datadir}/cmake/Modules/FindQuaZip5.cmake +%{_datadir}/cmake/FindQuaZip5.cmake %changelog +* Mon Oct 21 2019 Felipe Borges - 0.7.6-5 +- Add patch to fix FindQuaZip.cmake install path + * Fri Jul 26 2019 Fedora Release Engineering - 0.7.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild