From 5498a8aab3892cf74f5575d9b148ec6a563132cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Thu, 12 Apr 2018 23:36:53 +0200 Subject: [PATCH] - up to 0.8.0 - fix qt5 (mis)detection for qt4 build - add required glib2 to linker list --- QtKeychain.spec | 18 +++++++++++------- cmake.patch | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 cmake.patch diff --git a/QtKeychain.spec b/QtKeychain.spec index 46b8ab3..5fcdd8f 100644 --- a/QtKeychain.spec +++ b/QtKeychain.spec @@ -5,12 +5,13 @@ Summary: Qt API to store passwords and other secret data securely Name: QtKeychain -Version: 0.4.0 -Release: 2 +Version: 0.8.0 +Release: 1 License: Modified BSD License Group: Libraries Source0: https://github.com/frankosterfeld/qtkeychain/archive/v%{version}/%{name}-%{version}.tar.gz -# Source0-md5: e4e48d8742a9fd2664425d58be236424 +# Source0-md5: d741e7e55ae48a130cb95264fbe732b7 +Patch0: cmake.patch URL: https://github.com/frankosterfeld/qtkeychain BuildRequires: cmake BuildRequires: libstdc++-devel @@ -31,6 +32,8 @@ BuildRequires: qt5-qmake %endif BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +#define skip_post_check_so libqt5keychain.so.* + %description QtKeychain a Qt API to store passwords and other secret data securely. @@ -75,13 +78,14 @@ applications that use QKeychain. %prep %setup -q -n qtkeychain-%{version} +%patch0 -p1 %build %if %{with qt4} install -d build-qt4 cd build-qt4 %cmake \ - -DBUILD_WITH_QT4=ON \ + -DBUILD_WITH_QT4:BOOL=TRUE \ .. %{__make} cd .. @@ -91,7 +95,7 @@ cd .. install -d build-qt5 cd build-qt5 %cmake \ - -DBUILD_WITH_QT4=OFF \ + -DBUILD_WITH_QT4:BOOL=OFF \ .. %{__make} %endif @@ -123,7 +127,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc COPYING ReadMe.txt ChangeLog %attr(755,root,root) %{_libdir}/libqtkeychain.so.*.*.* -%ghost %{_libdir}/libqtkeychain.so.0 +%ghost %{_libdir}/libqtkeychain.so.1 %files devel %defattr(644,root,root,755) @@ -136,7 +140,7 @@ rm -rf $RPM_BUILD_ROOT %files -n Qt5Keychain %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libqt5keychain.so.*.*.* -%ghost %{_libdir}/libqt5keychain.so.0 +%ghost %{_libdir}/libqt5keychain.so.1 %files -n Qt5Keychain-devel %defattr(644,root,root,755) diff --git a/cmake.patch b/cmake.patch new file mode 100644 index 0000000..97e3e2b --- /dev/null +++ b/cmake.patch @@ -0,0 +1,20 @@ +--- qtkeychain-0.8.0/CMakeLists.txt.orig 2017-04-19 15:09:34.000000000 +0200 ++++ qtkeychain-0.8.0/CMakeLists.txt 2018-04-12 23:34:17.672301365 +0200 +@@ -21,6 +21,8 @@ + option(BUILD_TRANSLATIONS "Build translations" ON) + option(QTKEYCHAIN_STATIC "Build static library" OFF) + ++list(APPEND qtkeychain_LIBRARIES "-lglib-2.0") ++ + if(CMAKE_SYSTEM_NAME STREQUAL Android) + set(ANDROID 1) + endif() +@@ -38,7 +40,7 @@ + find_package(Qt5Core QUIET) + endif() + +-if (Qt5Core_FOUND) ++if (Qt5Core_FOUND AND NOT BUILD_WITH_QT4 ) + set(QTKEYCHAIN_VERSION_INFIX 5) + + if(UNIX AND NOT APPLE AND NOT ANDROID) -- 2.43.0