File pinentry.spec of Package pinentry

#
# spec file for package pinentry
#
# Copyright (c) 2011 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.1
Release:        1
License:        GPLv2+
Summary:        Collection of Simple PIN or Passphrase Entry Dialogs
Url:            http://www.gnupg.org/aegypten/
Group:          Productivity/Other
Source:         pinentry-%{version}.tar.bz2
Source1:        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
Patch3:         pinentry-0.7.2-curses-utf-8.diff
# 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
BuildRequires:  cmake
BuildRequires:  libcap-devel
BuildRequires:  libdrm-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libqt4-devel
BuildRequires:  ncurses-devel
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  qt3-devel
BuildRequires:  update-desktop-files
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-qt
Version:        %{version}
Release:        19
License:        GPLv2+
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-qt

%description -n pinentry-qt
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:        10
License:        GPLv2+
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-qt4

%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:        19
License:        GPLv2+
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
%setup -q
%patch0 -p 1
%patch1 -p 1
%patch2 -p 1
%patch3
%patch4 -p1
%patch5 -p1
%patch6 -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-qt \
	--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
%make_install
# remove symlink
rm -rf %{buildroot}%{_bindir}/pinentry
cp %{SOURCE1} %{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-qt
%attr(755,root,root) %{_bindir}/pinentry-qt

%files -n pinentry-qt4
%attr(755,root,root) %{_bindir}/pinentry-qt4

%files -n pinentry-gtk2
%attr(755,root,root) %{_bindir}/pinentry-gtk-2

%changelog
openSUSE Build Service is sponsored by