Improve compatibility with new CMake macro

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
epel9
Igor Raits 5 years ago
parent 201d6fe86d
commit bebd7809ea
No known key found for this signature in database
GPG Key ID: 115D5AB89C5C1E1E

@ -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

Loading…
Cancel
Save