Fix conditional logic to build on EPEL9

epel9
Carl George 3 years ago
parent 6ed16d1c30
commit 28fada8c12

@ -3,7 +3,7 @@
Name: keepassxc
Version: 2.7.1
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Cross-platform password manager
License: Boost and BSD and CC0 and GPLv3 and LGPLv2 and LGPLv2+ and LGPLv3+ and Public Domain
URL: http://www.keepassxc.org/
@ -32,12 +32,11 @@ Patch0: xcb.patch
BuildRequires: botan2-devel
BuildRequires: cmake >= 3.1
BuildRequires: desktop-file-utils
%if 0%{?fedora}
BuildRequires: gcc-c++ >= 4.7
%endif
%if 0%{?el8}
BuildRequires: gcc-toolset-11-toolchain
BuildRequires: gcc-toolset-11-gcc-c++
BuildRequires: gcc-toolset-11-annobin-plugin-gcc
%else
BuildRequires: gcc-c++
%endif
BuildRequires: libappstream-glib
BuildRequires: libargon2-devel
@ -68,7 +67,7 @@ BuildRequires: zlib-devel
# For EL8 missing rubygem-asciidoctor read
# https://bugzilla.redhat.com/show_bug.cgi?id=1859390
# https://bugzilla.redhat.com/show_bug.cgi?id=1820896
%if 0%{?fedora}
%if ! 0%{?el8}
BuildRequires: rubygem-asciidoctor
%endif
@ -111,28 +110,20 @@ information can be considered as quite safe.
# beyond the undefined symbols. It really shold be investigated further.
# Disable LTO
%define _lto_cflags %{nil}
%if 0%{?fedora}
%cmake \
-DWITH_TESTS=OFF \
-DWITH_XC_ALL=ON \
-DWITH_XC_KEESHARE_SECURE=ON \
-DWITH_XC_UPDATECHECK=OFF \
-DCMAKE_BUILD_TYPE=Release
%if 0%{?el8}
. /opt/rh/gcc-toolset-11/enable
%endif
# -DWITH_XC_DOCS=OFF is needed on EL due missing rubygem-asciidoctor
# For EL8 missing rubygem-asciidoctor read
# https://bugzilla.redhat.com/show_bug.cgi?id=1859390
# https://bugzilla.redhat.com/show_bug.cgi?id=1820896
%if 0%{?el8}
. /opt/rh/gcc-toolset-11/enable
%cmake \
-DWITH_TESTS=OFF \
-DWITH_XC_ALL=ON \
-DWITH_XC_KEESHARE_SECURE=ON \
-DWITH_XC_UPDATECHECK=OFF \
-DWITH_XC_DOCS=OFF \
-DWITH_XC_DOCS=%{?el8:OFF}%{!?el8:ON} \
-DCMAKE_BUILD_TYPE=Release
%endif
%cmake_build
%install
@ -182,12 +173,15 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.%{nam
%{_libdir}/%{name}
# Missing rubygem-asciidoctor in EL8 does not allow having documentation in EL8
# Read https://bugzilla.redhat.com/show_bug.cgi?id=1859390
%if 0%{?fedora}
%if ! 0%{?el8}
%{_mandir}/man1/%{name}-cli.1*
%{_mandir}/man1/%{name}.1*
%endif
%changelog
* Mon Jul 11 2022 Carl George <carl@george.computer> - 2.7.1-7
- Fix conditional logic to build on EPEL9
* Wed Jun 01 2022 Germano Massullo <germano.massullo@gmail.com> - 2.7.1-6
- rebuilt due EPEL8 Qt new version

Loading…
Cancel
Save