Notification time stamped 2020-08-31 20:01:22 UTC
From 4bc961c7caa8588d73174aeb136525c638f08bfc Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <michel(a)michel-slm.name>
Date: Aug 31 2020 19:50:41 +0000
Subject: Fix for CMake macro changes
Add ability to disable Qt4 build (makes it easier to maintain EPEL8 branch)
Signed-off-by: Michel Alexandre Salim <michel(a)michel-slm.name>
---
diff --git a/qtkeychain.spec b/qtkeychain.spec
index 1f4b82b..33a3d29 100644
--- a/qtkeychain.spec
+++ b/qtkeychain.spec
@@ -1,6 +1,12 @@
+%if 0%{?fedora}
+%bcond_without qt4
+%else
+%bcond_with qt4
+%endif
+
Name: qtkeychain
Version: 0.10.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A password store library
License: BSD
@@ -9,8 +15,10 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: cmake
+%if %{with qt4}
BuildRequires: pkgconfig(QtCore)
BuildRequires: pkgconfig(QtDBus)
+%endif
BuildRequires: pkgconfig(libsecret-1)
%description
@@ -47,33 +55,39 @@ This package contains development files for qt5keychain.
%prep
%autosetup -p1
+%if %{with qt4}
mkdir %{_target_platform}-qt4
-mkdir %{_target_platform}-qt5
+%endif
%build
-pushd %{_target_platform}-qt4
- %cmake .. \
- -DBUILD_WITH_QT4:BOOL=ON \
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
-popd
-pushd %{_target_platform}-qt5
- %cmake .. \
- -DBUILD_WITH_QT4:BOOL=OFF \
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
-popd
+%if %{with qt4}
+%cmake -B %{_target_platform}-qt4 \
+ -DBUILD_WITH_QT4:BOOL=ON \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo
%make_build -C %{_target_platform}-qt4
-%make_build -C %{_target_platform}-qt5
+%endif
+
+%cmake \
+ -DBUILD_WITH_QT4:BOOL=OFF \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo
+
+%cmake_build
%install
+%if %{with qt4}
%make_install -C %{_target_platform}-qt4
-%make_install -C %{_target_platform}-qt5
+%endif
+%cmake_install
%find_lang %{name} --with-qt
+%if %{with qt4}
grep %{_qt4_translationdir} %{name}.lang > %{name}-qt4.lang
+%endif
grep %{_qt5_translationdir} %{name}.lang > %{name}-qt5.lang
+%if %{with qt4}
%files -f %{name}-qt4.lang
%doc ReadMe.txt
%license COPYING
@@ -85,6 +99,7 @@ grep %{_qt5_translationdir} %{name}.lang > %{name}-qt5.lang
%{_libdir}/cmake/QtKeychain/
%{_libdir}/libqtkeychain.so
%{_libdir}/qt5/mkspecs/modules/qt_QtKeychain.pri
+%endif
%files qt5 -f %{name}-qt5.lang
%doc ReadMe.txt
@@ -99,6 +114,10 @@ grep %{_qt5_translationdir} %{name}.lang > %{name}-qt5.lang
%{_libdir}/qt5/mkspecs/modules/qt_Qt5Keychain.pri
%changelog
+* Mon Aug 31 2020 Michel Alexandre Salim <salimma(a)fedoraproject.org> - 0.10.0-4
+- Fix for CMake macro changes
+- Add ability to disable Qt4 build (makes it easier to maintain EPEL8 branch)
+
* Sat Aug 01 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.10.0-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
https://src.fedoraproject.org/rpms/qtkeychain/c/4bc961c7caa8588d73174aeb1...