From bebd7809ea94a8cd6cbe8dc6f51010759e4f52a3 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sat, 18 Jul 2020 14:45:33 +0200 Subject: [PATCH] Improve compatibility with new CMake macro Signed-off-by: Igor Raits --- keepassxc.spec | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/keepassxc.spec b/keepassxc.spec index 9362e41..958401b 100644 --- a/keepassxc.spec +++ b/keepassxc.spec @@ -1,3 +1,4 @@ +%undefine __cmake_in_source_build # EPEL7 not possible because libgcrypt version is 1.5 Name: keepassxc @@ -8,11 +9,7 @@ License: Boost and BSD and CC0 and GPLv3 and LGPLv2 and LGPLv2+ and LGPLv URL: http://www.keepassxc.org/ Source0: https://github.com/keepassxreboot/keepassxc/releases/download/%{version}/keepassxc-%{version}-src.tar.xz -%if 0%{?el7} -BuildRequires: cmake3 >= 3.1 -%else BuildRequires: cmake >= 3.1 -%endif BuildRequires: desktop-file-utils BuildRequires: gcc-c++ >= 4.7 BuildRequires: qt5-qtbase-devel >= 5.2 @@ -70,21 +67,16 @@ information can be considered as quite safe. # Disable LTO %define _lto_cflags %{nil} -mkdir build -cd build - -%cmake .. \ +%cmake \ -DWITH_TESTS=OFF \ -DWITH_XC_ALL=ON \ -DWITH_XC_KEESHARE_SECURE=ON \ -WITH_XC_UPDATECHECK=OFF \ -DCMAKE_BUILD_TYPE=Release - -%make_build +%cmake_build %install -cd build -%make_install +%cmake_install desktop-file-install \ --dir %{buildroot}%{_datadir}/applications \ @@ -110,7 +102,7 @@ install -D -m 644 -p x-keepassxc.desktop \ %find_lang keepassx --with-qt %check -ctest -V %{?_smp_mflags} +%ctest desktop-file-validate %{buildroot}%{_datadir}/applications/org.%{name}.KeePassXC.desktop appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.%{name}.KeePassXC.appdata.xml