Disable gtk2 on RHEL 10

This commit is contained in:
Yaakov Selkowitz 2023-03-19 12:30:10 -04:00
parent 17af62d2fb
commit 8ef2a64445

View File

@ -1,3 +1,7 @@
%if 0%{?fedora} || 0%{?rhel} < 10
%bcond_without gtk2
%endif
Name: pinentry Name: pinentry
Version: 1.2.1 Version: 1.2.1
Release: 2%{?dist} Release: 2%{?dist}
@ -17,7 +21,9 @@ BuildRequires: make
BuildRequires: gcc BuildRequires: gcc
# compat package for gnome 3 # compat package for gnome 3
BuildRequires: gcr3-devel BuildRequires: gcr3-devel
%if %{with gtk2}
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
%endif
BuildRequires: libcap-devel BuildRequires: libcap-devel
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: libgpg-error-devel BuildRequires: libgpg-error-devel
@ -45,6 +51,7 @@ utilize the Assuan protocol as described by the aegypten project; see
http://www.gnupg.org/aegypten/ for details. http://www.gnupg.org/aegypten/ for details.
This package contains the GNOME 3 version of the PIN entry dialog. This package contains the GNOME 3 version of the PIN entry dialog.
%if %{with gtk2}
%package gtk %package gtk
Summary: Passphrase/PIN entry dialog based on GTK+ Summary: Passphrase/PIN entry dialog based on GTK+
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -55,6 +62,7 @@ Pinentry is a collection of simple PIN or passphrase entry dialogs which
utilize the Assuan protocol as described by the aegypten project; see utilize the Assuan protocol as described by the aegypten project; see
http://www.gnupg.org/aegypten/ for details. http://www.gnupg.org/aegypten/ for details.
This package contains the GTK GUI based version of the PIN entry dialog. This package contains the GTK GUI based version of the PIN entry dialog.
%endif
%package qt %package qt
Summary: Passphrase/PIN entry dialog based on Qt5 Summary: Passphrase/PIN entry dialog based on Qt5
@ -98,7 +106,11 @@ This package contains the tty version of the PIN entry dialog.
--without-libcap \ --without-libcap \
--disable-pinentry-fltk \ --disable-pinentry-fltk \
--enable-pinentry-gnome3 \ --enable-pinentry-gnome3 \
%if %{with gtk2}
--enable-pinentry-gtk2 \ --enable-pinentry-gtk2 \
%else
--disable-pinentry-gtk2 \
%endif
--enable-pinentry-qt5 \ --enable-pinentry-qt5 \
--enable-pinentry-emacs \ --enable-pinentry-emacs \
--enable-pinentry-tty \ --enable-pinentry-tty \
@ -111,7 +123,9 @@ This package contains the tty version of the PIN entry dialog.
%make_install %make_install
# Symlink for Backward compatibility # Symlink for Backward compatibility
%if %{with gtk2}
ln -s pinentry-gtk-2 $RPM_BUILD_ROOT%{_bindir}/pinentry-gtk ln -s pinentry-gtk-2 $RPM_BUILD_ROOT%{_bindir}/pinentry-gtk
%endif
ln -s pinentry-qt $RPM_BUILD_ROOT%{_bindir}/pinentry-qt4 ln -s pinentry-qt $RPM_BUILD_ROOT%{_bindir}/pinentry-qt4
install -p -m755 -D %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pinentry install -p -m755 -D %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pinentry
@ -129,10 +143,12 @@ rm -fv $RPM_BUILD_ROOT%{_infodir}/dir
%files gnome3 %files gnome3
%{_bindir}/pinentry-gnome3 %{_bindir}/pinentry-gnome3
%if %{with gtk2}
%files gtk %files gtk
%{_bindir}/pinentry-gtk-2 %{_bindir}/pinentry-gtk-2
# symlink for backward compatibility # symlink for backward compatibility
%{_bindir}/pinentry-gtk %{_bindir}/pinentry-gtk
%endif
%files qt %files qt
%{_bindir}/pinentry-qt %{_bindir}/pinentry-qt