Fix conditional logic to build on EPEL9

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

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

Loading…
Cancel
Save