openssl-pkcs11-0.4.7-7

- Reintroduce libp11-devel subpackage for Fedora (#1583719)
This commit is contained in:
Anderson Toshiyuki Sasaki 2018-06-06 14:21:50 +02:00
parent af76019b40
commit 9f4dc952f3

View File

@ -1,5 +1,5 @@
Version: 0.4.7 Version: 0.4.7
Release: 6%{?dist} Release: 7%{?dist}
# Define the directory where the OpenSSL engines are installed # Define the directory where the OpenSSL engines are installed
%global enginesdir %{_libdir}/engines-1.1 %global enginesdir %{_libdir}/engines-1.1
@ -20,25 +20,44 @@ BuildRequires: pkgconfig(p11-kit-1)
# Needed for testsuite # Needed for testsuite
BuildRequires: softhsm opensc procps-ng BuildRequires: softhsm opensc procps-ng
%if 0%{?fedora}
BuildRequires: doxygen
%endif
Requires: p11-kit-trust Requires: p11-kit-trust
Requires: openssl > 0.9.6 Requires: openssl > 0.9.6
# Package renamed from libp11 to openssl-pkcs11 in release 0.4.7-4 # Package renamed from libp11 to openssl-pkcs11 in release 0.4.7-4
Provides: libp11%{?_isa} = %{version}-%{release} Provides: libp11%{?_isa} = %{version}-%{release}
Obsoletes: libp11 < 0.4.7-4 Obsoletes: libp11 < 0.4.7-4
# The libp11-devel subpackage was removed in libp11-0.4.7-1, but not obsoleted
# This Obsoletes prevents the conflict in updates by removing libp11-devel
Obsoletes: libp11-devel < 0.4.7-4
# The engine_pkcs11 subpackage is also provided # The engine_pkcs11 subpackage is also provided
Provides: engine_pkcs11%{?_isa} = %{version}-%{release} Provides: engine_pkcs11%{?_isa} = %{version}-%{release}
Obsoletes: engine_pkcs11 < 0.4.7-4 Obsoletes: engine_pkcs11 < 0.4.7-4
%if 0%{?fedora}
# The libp11-devel subpackage was removed in libp11-0.4.7-1, but not obsoleted
# This Obsoletes prevents the conflict in updates by removing old libp11-devel
Obsoletes: libp11-devel < 0.4.7-4
%endif
%description -n openssl-pkcs11 %description -n openssl-pkcs11
openssl-pkcs11 is an implementation of an engine for OpenSSL. It can be loaded openssl-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 using code, config file or command line and will pass any function call by
OpenSSL to a PKCS#11 module. openssl-pkcs11 is meant to be used with smart OpenSSL to a PKCS#11 module. openssl-pkcs11 is meant to be used with smart
cards and software for using smart cards in PKCS#11 format, such as OpenSC. cards and software for using smart cards in PKCS#11 format, such as OpenSC.
# The libp11-devel subpackage was reintroduced in libp11-0.4.7-7 for Fedora
%if 0%{?fedora}
%package -n libp11-devel
Summary: Files for developing with libp11
Requires: %{name} = %{version}-%{release}
%description -n libp11-devel
The libp11-devel package contains libraries and header files for
developing applications that use libp11.
%endif
%prep %prep
%autosetup -p 1 -n libp11-%{version} %autosetup -p 1 -n libp11-%{version}
# Fix permissions for file brought by a patch # Fix permissions for file brought by a patch
@ -47,7 +66,11 @@ chmod ugo+x %{_builddir}/libp11-0.4.7/tests/fork-change-slot.softhsm
%build %build
autoreconf -fvi autoreconf -fvi
export CFLAGS="%{optflags}" export CFLAGS="%{optflags}"
%if 0%{?fedora}
%configure --disable-static --enable-api-doc --with-enginesdir=%{enginesdir}
%else
%configure --disable-static --with-enginesdir=%{enginesdir} %configure --disable-static --with-enginesdir=%{enginesdir}
%endif
make V=1 %{?_smp_mflags} make V=1 %{?_smp_mflags}
%install %install
@ -58,10 +81,12 @@ make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{enginesdir}/*.la rm -f %{buildroot}%{enginesdir}/*.la
%if ! 0%{?fedora}
## Remove development files ## Remove development files
rm -f %{buildroot}%{_libdir}/libp11.so rm -f %{buildroot}%{_libdir}/libp11.so
rm -f %{buildroot}%{_libdir}/pkgconfig/libp11.pc rm -f %{buildroot}%{_libdir}/pkgconfig/libp11.pc
rm -f %{buildroot}%{_includedir}/*.h rm -f %{buildroot}%{_includedir}/*.h
%endif
# Remove documentation automatically installed by make install # Remove documentation automatically installed by make install
rm -rf %{buildroot}%{_docdir}/libp11/ rm -rf %{buildroot}%{_docdir}/libp11/
@ -79,7 +104,18 @@ make check %{?_smp_mflags}
%{_libdir}/libp11.so.* %{_libdir}/libp11.so.*
%{enginesdir}/*.so %{enginesdir}/*.so
%if 0%{?fedora}
%files -n libp11-devel
%doc examples/ doc/api.out/html/
%{_libdir}/libp11.so
%{_libdir}/pkgconfig/libp11.pc
%{_includedir}/*.h
%endif
%changelog %changelog
* Wed Jun 06 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.4.7-7
- Reintroduce libp11-devel subpackage to Fedora (#1583719)
* Tue Mar 13 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.4.7-6 * Tue Mar 13 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.4.7-6
- Obsolete libp11-devel to fix update - Obsolete libp11-devel to fix update