## START: Set by rpmautospec
## (rpmautospec version 0.3.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 6;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

Name:           gnupg-pkcs11-scd
Version:        0.10.0
Release:        %autorelease
Summary:        GnuPG-compatible smart-card daemon with PKCS#11 support

License:        BSD
URL:            http://gnupg-pkcs11.sourceforge.net
Source0:        https://github.com/alonbl/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2

BuildRequires:  gcc
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(libpkcs11-helper-1)
BuildRequires:  libassuan-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  make
Requires:       openssl
Requires:       pkcs11-helper >= 1.03

%description
gnupg-pkcs11-scd is a drop-in replacement for the smart-card daemon (scd)
shipped with the next-generation GnuPG (gnupg2). The daemon interfaces
with smart-cards by using RSA Security Inc.'s PKCS#11 Cryptographic Token
Interface.

%prep
%setup -q

%build
%configure
%{make_build}

%install
%{make_install}
rm -rf ${RPM_BUILD_ROOT}%{_docdir}

%files
%license COPYING
%doc AUTHORS README THANKS gnupg-pkcs11-scd/gnupg-pkcs11-scd.conf.example
%{_bindir}/%{name}
%{_mandir}/man1/%{name}*

%changelog
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Sun Feb 20 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 0.10.0-1
- Update to 0.10.0
- Spec cleanups

* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 0.9.2-7
- Rebuilt with OpenSSL 3.0.0

* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-4
- Second attempt - Rebuilt for
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Sun Oct 13 2019 W. Michael Petullo <mike@flyn.org> - 0.9.2-1
- New upstream version
- Remove upstreamed patch for OpenSSL 1.1.0+

* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sun Oct 08 2017 W. Michael Petullo <mike[@]flyn.org> - 0.9.1-2
- Markup COPYING as license
- Use pkgconfig function with BuildRequires

* Thu Oct 05 2017 W. Michael Petullo <mike[@]flyn.org> - 0.9.1-1
- New upstream version
- Add patch for OpenSSL 1.1.0+
- BuildRequire pkgconfig
- Do not remove build root in install section
- Do not use defattr

* Wed Mar 18 2015 W. Michael Petullo <mike[@]flyn.org> - 0.7.3-1
- New upstream version

* Mon Jun 16 2014 W. Michael Petullo <mike[@]flyn.org> - 0.7.2-2
- Remove some explicit library dependencies

* Thu May 19 2011 W. Michael Petullo <mike[@]flyn.org> - 0.7.2-1
- Initial package