Version: 0.4.7
Release: 3%{?dist}
# Define the directory where the OpenSSL engines are installed
%global enginesdir %{_libdir}/engines-1.1
Name: libp11
Summary: Library for using PKCS#11 modules
License: LGPLv2+
URL: https://github.com/OpenSC/libp11
Source0: https://github.com/OpenSC/libp11/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
Patch1: libp11-0.4.7-do-not-enumerate-slots-on-fork.patch
BuildRequires: autoconf automake libtool
BuildRequires: libtool-ltdl-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
# needed for testsuite
BuildRequires: softhsm opensc procps-ng
%description
Libp11 is a library implementing a small layer on top of PKCS#11 API to
make using PKCS#11 implementations easier.
## We no longer ship libp11-devel; we treat libp11 as an internal library.
## OpenSSL applications should use the engine instead.
%package -n engine_pkcs11
Summary: A PKCS#11 engine for use with OpenSSL
License: BSD
BuildRequires: openssl-devel pkgconfig
BuildRequires: pkgconfig(p11-kit-1)
BuildRequires: softhsm opensc
Requires: p11-kit-trust
Requires: openssl > 0.9.6
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n engine_pkcs11
Engine_pkcs11 is an implementation of an engine for OpenSSL. It can be loaded
using code, config file or command line and will pass any function call by
openssl to a PKCS#11 module. Engine_pkcs11 is meant to be used with smart
cards and software for using smart cards in PKCS#11 format, such as OpenSC.
%prep
%autosetup -p 1
# Fix permissions for file brought by a patch
chmod 755 %{_builddir}/libp11-0.4.7/tests/fork-change-slot.softhsm
%build
autoreconf -fvi
export CFLAGS="%{optflags}"
%configure --disable-static --with-enginesdir=%{enginesdir}
make V=1 %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{enginesdir}
make install DESTDIR=%{buildroot}
# Remove libtool .la files
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{enginesdir}/*.la
## Remove development files
rm -f %{buildroot}%{_libdir}/libp11.so
rm -f %{buildroot}%{_libdir}/pkgconfig/libp11.pc
rm -f %{buildroot}%{_includedir}/*.h
# Remove documentation automatically installed by make install
rm -rf %{buildroot}%{_docdir}/%{name}/
%check
make check %{?_smp_mflags}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license COPYING
%doc NEWS
%{_libdir}/libp11.so.*
%files -n engine_pkcs11
%doc NEWS
%{enginesdir}/*.so
%changelog
* Mon Feb 26 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.4.7-3
- Add a patch to avoid an error in forking processes (commit cf5e7a3)
- Removed doxygen and graphviz dependencies (commit 47ba7fe)
- Make build honor applicable compiler flags (commit 2b7b845)
- Spec file cleanup and alignment with Fedora Packaging Guidelines
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Oct 06 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.4.7-1
- Update to upstream 0.4.7 release
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sun Apr 30 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.4.6-1
- Update to upstream 0.4.6 release
* Wed Apr 26 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> 0.4.3-1
- new package built with tito
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Oct 27 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.4.2-3
- libp11-devel conflicts with compat-openssl10-devel to prevent incorrect compilations
* Tue Oct 25 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.4.2-2
- Built against openssl 1.1.0 with versioned symbols; use different soname
* Sun Sep 25 2016 David Woodhouse <dwmw2@infradead.org> - 0.4.2-1
- New upstream release
* Thu Sep 8 2016 David Woodhouse <dwmw2@infradead.org> - 0.4.0-2
- Add upstream patch to find CKA_PRIVATE certificates
* Fri Jul 29 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.4.0-1
- New upstream release; incorporates engine_pkcs11
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Oct 9 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.3.0-1
- Updated to lastest upstream release
* Fri Jul 17 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.2.8-11
- Bug fixes in module reinitialization on fork (#1235284)
* Thu Jul 9 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.2.8-10
- Added transparent support for PKCS #11 module reinitialization on fork (#1235284)
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 29 2015 David Woodhouse <dwmw2@infradead.org> - 0.2.8-8
- Increase maximum certificate size to 4KiB.
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Fri Apr 15 2011 Kalev Lember <kalev@smartlink.ee> - 0.2.8-1
- Update to 0.2.8
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sun Jul 04 2010 Kalev Lember <kalev@smartlink.ee> - 0.2.7-2
- Spec file cleanup
- Don't install html docs with main library package
- Removed R: pkgconfig from -devel as it is now automatically added
* Wed Nov 25 2009 Kalev Lember <kalev@smartlink.ee> - 0.2.7-1
- Update to 0.2.7
* Sat Aug 22 2009 Kalev Lember <kalev@smartlink.ee> - 0.2.6-1
- Update to 0.2.6
- Enable building documentation with doxygen
- Use INSTALL="install -p" to preserve timestamps
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.2.3-8
- rebuilt with new openssl
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 0.2.3-5
- rebuild with new openssl
* Fri Nov 28 2008 Adam Tkac <atkac redhat com> - 0.2.3-4
- rebuild against new libltdl
* Thu Aug 7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.2.3-3
- fix license tag
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.2.3-2
- Autorebuild for GCC 4.3
* Thu Dec 06 2007 Matt Anderson <mra@hp.com> - 0.2.3-1
- Update to latest upstream sources
* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - 0.2.2-7
- Rebuild for deps
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 0.2.2-6
- Rebuild for selinux ppc32 issue.
* Thu Jun 28 2007 Matt Anderson <mra@hp.com> - 0.2.2-5
- Additional suggestions by tibbs@math.uh.edu, Source0 URL and license in docs
* Wed Jun 27 2007 Matt Anderson <mra@hp.com> - 0.2.2-4
- Merged in changes suggested by michael@gmx.net
* Thu Jun 21 2007 Matt Anderson <mra@hp.com> - 0.2.2-3
- Rebuilt .spec file based on rpmdev-newspec template
- Added --disable-static to comply with Fedora Packaging/Guidelines
* Thu Jun 21 2007 Matt Anderson <mra@hp.com> - 0.2.2-2
- Merged in changes suggested by tibbs@math.uh.edu
* Wed Jun 20 2007 Matt Anderson <mra@hp.com> - 0.2.2-1
- Initial RPM packaging