File mingw64-pinentry.spec of Package mingw64-pinentry
#
# spec file for package mingw64-pinentry
#
# Copyright (c) 2017 SUSE LINUX 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/
#
%define _with_qt4 0
%define _with_qt5 1
%define _name pinentry
Name: mingw64-%{_name}
Version: 1.1.1
Release: 0
Summary: Collection of Simple PIN or Passphrase Entry Dialogs
License: GPL-2.0-or-later
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
Patch1: pinentry-0.7.2-gtk+-2.4.diff
BuildRequires: mingw64-cross-gcc-c++
BuildRequires: mingw64-cross-libqt4-qmake
BuildRequires: mingw64-libassuan-devel
BuildRequires: mingw64-libgpg-error-devel
%if %{_with_qt4}
BuildRequires: mingw64-libqt4-devel >= 4.8.0
%endif
%if %{_with_qt5}
BuildRequires: mingw64(cmake:Qt5Core)
%endif
%_mingw64_package_header_debug
BuildArch: noarch
%description
This is a collection of simple PIN or passphrase entry dialogs which
utilize the Assuan protocol as described by the Aegypten project.
%if %{_with_qt4}
%package qt4
Summary: Collection of Simple PIN or Passphrase Entry Dialogs
Group: Productivity/Other
Requires: mingw64-pinentry
Provides: mingw64-pinentry-dialog
Provides: mingw64-pinentry-gui
Provides: mingw64-pinentry-qt = %{version}
Provides: mingw64-pinentry-qt4 = %{version}-%{release}
%description qt4
This is a collection of simple PIN or passphrase entry dialogs which
utilize the Assuan protocol as described by the Aegypten project.
%endif
%if %{_with_qt5}
%package qt5
Summary: Collection of Simple PIN or Passphrase Entry Dialogs
Group: Productivity/Other
Requires: mingw64-pinentry
Provides: mingw64-pinentry-dialog
Provides: mingw64-pinentry-gui
Provides: mingw64-pinentry-qt = %{version}
Provides: mingw64-pinentry-qt5 = %{version}-%{release}
%description qt5
This is a collection of simple PIN or passphrase entry dialogs which
utilize the Assuan protocol as described by the Aegypten project.
%endif
%_mingw64_debug_package
%prep
%setup -q -n %{_name}-%{version}
%autopatch -p1
%build
%_mingw64_configure \
%if %{_with_qt4} || %{_with_qt5}
--enable-pinentry-qt
%endif
%_mingw64_make
%install
%_mingw64_makeinstall
rm %{buildroot}%{_mingw64_bindir}/pinentry
mv %{buildroot}%{_mingw64_bindir}/pinentry-w32.exe %{buildroot}%{_mingw64_bindir}/pinentry.exe
%if %{_with_qt4}
mv %{buildroot}%{_mingw64_bindir}/pinentry-qt.exe %{buildroot}%{_mingw64_bindir}/pinentry-qt4.exe
%endif
%if %{_with_qt5}
mv %{buildroot}%{_mingw64_bindir}/pinentry-qt.exe %{buildroot}%{_mingw64_bindir}/pinentry-qt5.exe
%endif
rm -f %{buildroot}%{_mingw64_datadir}/info/dir*
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_mingw64_infodir}/pinentry.info*
%attr(755,root,root) %{_mingw64_bindir}/pinentry.exe
%if %{_with_qt4}
%files qt4
%defattr(-,root,root)
%attr(755,root,root) %{_mingw64_bindir}/pinentry-qt4.exe
%endif
%if %{_with_qt5}
%files qt5
%defattr(-,root,root)
%attr(755,root,root) %{_mingw64_bindir}/pinentry-qt5.exe
%endif
%changelog