File pinentry.spec of Package pinentry
#
# spec file for package pinentry
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: pinentry
Version: 0.8.3
Release: 0
Summary: Collection of Simple PIN or Passphrase Entry Dialogs
License: GPL-2.0+
Group: Productivity/Other
Url: http://www.gnupg.org/aegypten/
Source: ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.bz2
Source1: ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.bz2.sig
Source2: pinentry.keyring
Source3: pinentry
Patch0: moreSecureMemoryForPinentry-qt.diff
Patch1: pinentry-0.7.2-gtk+-2.4.diff
Patch2: pinentry-0.7.2-bnc179996_disable_inputmethod_for_passords.patch
# PATCH-FIX-UPSTREAM allow paste for pinentry-qt4 (bnc#690514)
Patch4: pinentry-0.8.1-allow_paste_qt4.patch
# PATCH-FIX-UPSTREAM allow paste for pinentry-gtk-2 (bnc#690514)
Patch5: pinentry-0.8.1-allow_paste_gtk2.patch
# PATCH-FIX-SUSE fix qt4 password entry not to allow IM (bnc#725471)
Patch6: qt4-disable-inputmethod-for-passwords.diff
# PATCH-FIX-SUSE add -ltinfo to fix build
Patch8: pinentry-0.8.1-tinfo.patch
BuildRequires: automake >= 1.10
BuildRequires: cmake
BuildRequires: libcap-devel
BuildRequires: libdrm-devel
BuildRequires: libjpeg-devel
BuildRequires: libqt4-devel
BuildRequires: ncurses-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(gtk+-2.0)
%if %suse_version >= 1230
BuildRequires: gpg-offline
%endif
PreReq: %install_info_prereq
Provides: pinentry-dialog
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global ncursesw_config %(set -- %{_bindir}/ncursesw*-config; echo ${1})
%description
This is a collection of simple PIN or passphrase entry dialogs which
utilize the Assuan protocol as described by the Aegypten project.
%package -n pinentry-qt4
Version: %{version}
Release: 0
Summary: Collection of Simple PIN or Passphrase Entry Dialogs
Group: Productivity/Other
Requires: pinentry
Provides: pinentry-dialog
Provides: pinentry-gui
Provides: pinentry-qt = %{version}
Provides: pinentry:/usr/bin/pinentry-qt4
Obsoletes: pinentry-qt <= 0.8.3
%description -n pinentry-qt4
This is a collection of simple PIN or passphrase entry dialogs which
utilize the Assuan protocol as described by the Aegypten project.
%package -n pinentry-gtk2
Version: %{version}
Release: 0
Summary: Collection of Simple PIN or Passphrase Entry Dialogs
Group: Productivity/Other
Requires: pinentry
Provides: pinentry-dialog
Provides: pinentry-gui
Provides: pinentry:/usr/bin/pinentry-gtk-2
%description -n pinentry-gtk2
This is a collection of simple PIN or passphrase entry dialogs which
utilize the Assuan protocol as described by the Aegypten project.
%prep
%{?gpg_verify: %gpg_verify %{S:1}}
%setup -q
%patch0 -p 1
%patch1 -p 1
%patch2 -p 1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch8 -p1
%build
cp /usr/share/gettext/config.rpath .
autoreconf -fi
# Regenerate moc's
moc qt4/pinentrydialog.h > qt4/pinentrydialog.moc
moc qt4/qsecurelineedit.h > qt4/qsecurelineedit.moc
export CFLAGS="%{optflags} $(%{ncursesw_config} --cflags)"
export CXXFLAGS="%{optflags} $(%{ncursesw_config} --cflags)"
%configure \
--enable-pinentry-curses \
--enable-pinentry-qt4 \
--enable-pinentry-gtk2 \
--with-qt-dir=%{_libdir}/qt3/ \
--with-qt-includes=%{_libdir}/qt3/include/ \
--with-qt-libraries=%{_libdir}/qt3/%{_lib}/ \
--without-ncurses-include-dir
make %{?_smp_mflags}
%install
%makeinstall DESTDIR=%{buildroot}
# remove symlink
rm -rf %{buildroot}%{_bindir}/pinentry
cp %{SOURCE3} %{buildroot}%{_bindir}
%post
%install_info --info-dir=.%{_infodir} .%{_infodir}/pinentry.info.gz
%postun
%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/pinentry.info.gz
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%doc %{_infodir}/pinentry*
%attr(755,root,root) %{_bindir}/pinentry
%attr(755,root,root) %{_bindir}/pinentry-curses
%files -n pinentry-qt4
%attr(755,root,root) %{_bindir}/pinentry-qt4
%files -n pinentry-gtk2
%attr(755,root,root) %{_bindir}/pinentry-gtk-2
%changelog