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
epel9
Felipe Borges 5 years ago
parent 0218038226
commit 9febbfea47

@ -0,0 +1,22 @@
From f323e478b1c05f470393bb57b486c0d871cf4736 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
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)

@ -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 <feborges@redhat.com> - 0.7.6-5
- Add patch to fix FindQuaZip.cmake install path
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

Loading…
Cancel
Save