- drop alternatives, use app-wrapper instead (borrowed from opensuse)
- -qt4 experimental subpkg, -qt includes qt3 version again (#523488)
This commit is contained in:
parent
1ecf4710f1
commit
1c408d0148
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
# Copyright (c) 2009 Fedora Project
|
||||||
# This file and all modifications and additions to the pristine
|
# This file and all modifications and additions to the pristine
|
||||||
# package are under the same license as the package itself.
|
# package are under the same license as the package itself.
|
||||||
#
|
#
|
||||||
@ -8,9 +9,12 @@
|
|||||||
#
|
#
|
||||||
# Anna Bernathova <anicka@novell.com> 2006
|
# Anna Bernathova <anicka@novell.com> 2006
|
||||||
# Pavel Nemec <pnemec@novell.com> 2006
|
# Pavel Nemec <pnemec@novell.com> 2006
|
||||||
|
# Rex Dieter <rdieter@fedoraproject.org> 2009
|
||||||
#
|
#
|
||||||
# use proper binary (pinentry-qt, pinentry-gtk-2 or pinentry-curses)
|
# use proper binary (pinentry-qt, pinentry-gtk-2 or pinentry-curses)
|
||||||
|
|
||||||
|
if [ -z "$PINENTRY_BINARY" ]; then
|
||||||
|
|
||||||
kde_running=
|
kde_running=
|
||||||
if [ -n "$KDE_FULL_SESSION" ]; then
|
if [ -n "$KDE_FULL_SESSION" ]; then
|
||||||
kde_running=1
|
kde_running=1
|
||||||
@ -40,15 +44,19 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# if KDE is detected and pinentry-qt exists, use pinentry-qt
|
# if KDE is detected and pinentry-qt exists, use pinentry-qt
|
||||||
if [ -n "$kde_running" -a -f /usr/bin/pinentry-qt ]
|
if [ -n "$kde_running" -a -x /usr/bin/pinentry-qt ]
|
||||||
then
|
then
|
||||||
export PINENTRY_BINARY="/usr/bin/pinentry-qt"
|
export PINENTRY_BINARY="/usr/bin/pinentry-qt"
|
||||||
# otherwise test if pinentry-gtk-2 is installed
|
# otherwise test if pinentry-gtk-2 is installed
|
||||||
elif [ -f /usr/bin/pinentry-gtk-2 ]
|
elif [ -x /usr/bin/pinentry-gtk-2 ]
|
||||||
then
|
then
|
||||||
export PINENTRY_BINARY="/usr/bin/pinentry-gtk-2"
|
export PINENTRY_BINARY="/usr/bin/pinentry-gtk-2"
|
||||||
|
# otherwise test if pinentry-qt4 is installed
|
||||||
|
elif [ -x /usr/bin/pinentry-qt4 ]
|
||||||
|
then
|
||||||
|
export PINENTRY_BINARY="/usr/bin/pinentry-qt4"
|
||||||
# otherwise test if pinentry-qt exists although KDE is not detected
|
# otherwise test if pinentry-qt exists although KDE is not detected
|
||||||
elif [ -f /usr/bin/pinentry-qt ]
|
elif [ -x /usr/bin/pinentry-qt ]
|
||||||
then
|
then
|
||||||
export PINENTRY_BINARY="/usr/bin/pinentry-qt"
|
export PINENTRY_BINARY="/usr/bin/pinentry-qt"
|
||||||
# pinentry-curses is installed by default
|
# pinentry-curses is installed by default
|
||||||
@ -57,11 +65,13 @@ else
|
|||||||
for opt in "$@"; do
|
for opt in "$@"; do
|
||||||
if [ "x$opt" = "x--display" ]; then
|
if [ "x$opt" = "x--display" ]; then
|
||||||
# should not happen because of package dependencies
|
# should not happen because of package dependencies
|
||||||
echo "Please install pinentry-qt or pinentry-gtk2" >&2
|
echo "Please install pinentry-gui" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
export PINENTRY_BINARY="/usr/bin/pinentry-curses"
|
export PINENTRY_BINARY="/usr/bin/pinentry-curses"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
exec $PINENTRY_BINARY "$@"
|
exec $PINENTRY_BINARY "$@"
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
|
|
||||||
%if 0%{?fedora} > 8 || 0%{?rhel} > 5
|
%if 0%{?fedora} > 8 || 0%{?rhel} > 5
|
||||||
%define _enable_pinentry_qt4 --enable-pinentry-qt4
|
%define _enable_pinentry_qt4 --enable-pinentry-qt4
|
||||||
|
%define _enable_pinentry_qt --enable-pinentry-qt
|
||||||
%else
|
%else
|
||||||
%define _enable_pinentry_qt --enable-pinentry-qt
|
%define _enable_pinentry_qt --enable-pinentry-qt
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: pinentry
|
Name: pinentry
|
||||||
Version: 0.7.6
|
Version: 0.7.6
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Collection of simple PIN or passphrase entry dialogs
|
Summary: Collection of simple PIN or passphrase entry dialogs
|
||||||
|
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -17,6 +18,9 @@ Source0: ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.gz
|
|||||||
Source1: ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.gz.sig
|
Source1: ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.gz.sig
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
# borrowed from opensuse
|
||||||
|
Source10: pinentry-wrapper
|
||||||
|
|
||||||
BuildRequires: gtk2-devel
|
BuildRequires: gtk2-devel
|
||||||
BuildRequires: libcap-devel
|
BuildRequires: libcap-devel
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
@ -27,9 +31,8 @@ BuildRequires: qt-devel
|
|||||||
BuildRequires: qt4-devel
|
BuildRequires: qt4-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires(post): %{_sbindir}/update-alternatives
|
Requires(pre): %{_sbindir}/update-alternatives
|
||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
Requires(postun): %{_sbindir}/update-alternatives
|
|
||||||
Requires(preun): /sbin/install-info
|
Requires(preun): /sbin/install-info
|
||||||
|
|
||||||
Provides: %{name}-curses = %{version}-%{release}
|
Provides: %{name}-curses = %{version}-%{release}
|
||||||
@ -45,8 +48,6 @@ Summary: Passphrase/PIN entry dialog based on GTK+
|
|||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Provides: %{name}-gui = %{version}-%{release}
|
Provides: %{name}-gui = %{version}-%{release}
|
||||||
Requires(post): %{_sbindir}/update-alternatives
|
|
||||||
Requires(postun): %{_sbindir}/update-alternatives
|
|
||||||
%description gtk
|
%description gtk
|
||||||
Pinentry is a collection of simple PIN or passphrase entry dialogs which
|
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
|
||||||
@ -54,17 +55,27 @@ 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.
|
||||||
|
|
||||||
%package qt
|
%package qt
|
||||||
Summary: Passphrase/PIN entry dialog based on Qt
|
Summary: Passphrase/PIN entry dialog based on Qt3
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Provides: %{name}-gui = %{version}-%{release}
|
Provides: %{name}-gui = %{version}-%{release}
|
||||||
Requires(post): %{_sbindir}/update-alternatives
|
|
||||||
Requires(postun): %{_sbindir}/update-alternatives
|
|
||||||
%description qt
|
%description qt
|
||||||
Pinentry is a collection of simple PIN or passphrase entry dialogs which
|
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 Qt GUI based version of the PIN entry dialog.
|
This package contains the Qt3 GUI based version of the PIN entry dialog.
|
||||||
|
|
||||||
|
%package qt4
|
||||||
|
Summary: Passphrase/PIN entry dialog based on Qt4
|
||||||
|
Group: Applications/System
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Provides: %{name}-gui = %{version}-%{release}
|
||||||
|
%description qt4
|
||||||
|
Pinentry is a collection of simple PIN or passphrase entry dialogs which
|
||||||
|
utilize the Assuan protocol as described by the aegypten project; see
|
||||||
|
http://www.gnupg.org/aegypten/ for details.
|
||||||
|
This package contains the Qt4 GUI based version of the PIN entry dialog.
|
||||||
|
Support for Qt4 is new, and a bit experimental.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
@ -100,12 +111,8 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
|||||||
|
|
||||||
# Backwards compatibility
|
# Backwards compatibility
|
||||||
ln -s pinentry-gtk-2 $RPM_BUILD_ROOT%{_bindir}/pinentry-gtk
|
ln -s pinentry-gtk-2 $RPM_BUILD_ROOT%{_bindir}/pinentry-gtk
|
||||||
%if 0%{?_enable_pinentry_qt4:1}
|
|
||||||
ln -s pinentry-qt4 $RPM_BUILD_ROOT%{_bindir}/pinentry-qt
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Dummy symlink for %%ghost
|
install -p -m755 -D %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pinentry
|
||||||
ln -sf %{_sysconfdir}/alternatives/pinentry $RPM_BUILD_ROOT%{_bindir}/pinentry
|
|
||||||
|
|
||||||
# unpackaged files
|
# unpackaged files
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||||
@ -115,63 +122,49 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
# alternatives dropped at 0.7.6-3 (use %%trigger instead?)
|
||||||
|
%pre
|
||||||
|
%{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-curses ||:
|
||||||
|
%{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-gtk ||:
|
||||||
|
%{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-qt ||:
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/install-info %{_infodir}/pinentry.info %{_infodir}/dir
|
/sbin/install-info %{_infodir}/pinentry.info %{_infodir}/dir
|
||||||
%{_sbindir}/update-alternatives --install %{_bindir}/pinentry \
|
|
||||||
pinentry %{_bindir}/pinentry-curses %{?curses_priority}%{!?curses_priority:10} ||:
|
|
||||||
|
|
||||||
%post gtk
|
|
||||||
%{_sbindir}/update-alternatives --install %{_bindir}/pinentry \
|
|
||||||
pinentry %{_bindir}/pinentry-gtk %{?gtk_priority}%{!?gtk_priority:40} ||:
|
|
||||||
|
|
||||||
%post qt
|
|
||||||
%{_sbindir}/update-alternatives --install %{_bindir}/pinentry \
|
|
||||||
pinentry %{_bindir}/pinentry-qt %{?qt_priority}%{!?qt_priority:30} ||:
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
/sbin/install-info --delete %{_infodir}/pinentry.info %{_infodir}/dir ||:
|
/sbin/install-info --delete %{_infodir}/pinentry.info %{_infodir}/dir ||:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun
|
|
||||||
if [ $1 -eq 0 ] ; then
|
|
||||||
%{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-curses ||:
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun gtk
|
|
||||||
if [ $1 -eq 0 ] ; then
|
|
||||||
%{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-gtk ||:
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun qt
|
|
||||||
if [ $1 -eq 0 ] ; then
|
|
||||||
%{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-qt ||:
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc AUTHORS ChangeLog COPYING NEWS README THANKS TODO
|
%doc AUTHORS ChangeLog COPYING NEWS README THANKS TODO
|
||||||
%{_bindir}/pinentry-curses
|
%{_bindir}/pinentry-curses
|
||||||
%ghost %{_bindir}/pinentry
|
%{_bindir}/pinentry
|
||||||
%{_infodir}/pinentry.info*
|
%{_infodir}/pinentry.info*
|
||||||
|
|
||||||
%files gtk
|
%files gtk
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/pinentry-gtk
|
%{_bindir}/pinentry-gtk
|
||||||
%{_bindir}/pinentry-gtk-2
|
%{_bindir}/pinentry-gtk-2
|
||||||
%ghost %{_bindir}/pinentry
|
|
||||||
|
|
||||||
%files qt
|
%files qt
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/pinentry-qt
|
%{_bindir}/pinentry-qt
|
||||||
|
|
||||||
%if 0%{?_enable_pinentry_qt4:1}
|
%if 0%{?_enable_pinentry_qt4:1}
|
||||||
|
%files qt4
|
||||||
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/pinentry-qt4
|
%{_bindir}/pinentry-qt4
|
||||||
%endif
|
%endif
|
||||||
%ghost %{_bindir}/pinentry
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 13 2009 Rex Dieter <rdieter@fedoraproject.org> - 0.7.6-3
|
||||||
|
- drop alternatives, use app-wrapper instead (borrowed from opensuse)
|
||||||
|
- -qt4 experimental subpkg, -qt includes qt3 version again (#523488)
|
||||||
|
|
||||||
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.6-2
|
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.6-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user