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 # EPEL7 not possible because libgcrypt version is 1.5
Name: keepassxc 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/ URL: http://www.keepassxc.org/
Source0: https://github.com/keepassxreboot/keepassxc/releases/download/%{version}/keepassxc-%{version}-src.tar.xz 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 BuildRequires: cmake >= 3.1
%endif
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: gcc-c++ >= 4.7 BuildRequires: gcc-c++ >= 4.7
BuildRequires: qt5-qtbase-devel >= 5.2 BuildRequires: qt5-qtbase-devel >= 5.2
@ -70,21 +67,16 @@ information can be considered as quite safe.
# Disable LTO # Disable LTO
%define _lto_cflags %{nil} %define _lto_cflags %{nil}
mkdir build %cmake \
cd build
%cmake .. \
-DWITH_TESTS=OFF \ -DWITH_TESTS=OFF \
-DWITH_XC_ALL=ON \ -DWITH_XC_ALL=ON \
-DWITH_XC_KEESHARE_SECURE=ON \ -DWITH_XC_KEESHARE_SECURE=ON \
-WITH_XC_UPDATECHECK=OFF \ -WITH_XC_UPDATECHECK=OFF \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release
%cmake_build
%make_build
%install %install
cd build %cmake_install
%make_install
desktop-file-install \ desktop-file-install \
--dir %{buildroot}%{_datadir}/applications \ --dir %{buildroot}%{_datadir}/applications \
@ -110,7 +102,7 @@ install -D -m 644 -p x-keepassxc.desktop \
%find_lang keepassx --with-qt %find_lang keepassx --with-qt
%check %check
ctest -V %{?_smp_mflags} %ctest
desktop-file-validate %{buildroot}%{_datadir}/applications/org.%{name}.KeePassXC.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/org.%{name}.KeePassXC.desktop
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.%{name}.KeePassXC.appdata.xml appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.%{name}.KeePassXC.appdata.xml

Loading…
Cancel
Save