- switch to building only the provider

This commit is contained in:
Dan Horák 2023-01-06 16:14:35 +00:00
parent f46f9431ee
commit 9560c98950

View File

@ -1,19 +1,9 @@
%global enginesdir %(pkg-config --variable=enginesdir libcrypto) %global modulesdir %%(pkg-config --variable=modulesdir libcrypto)
%global modulesdir %(openssl version -m | grep -o '".*"' | tr -d '"')
# Above can be replaced by the following once OpenSSL commit
# https://github.com/openssl/openssl/commit/7fde39de848f062d6db45bf9e69439db2100b9bb
# has been included into the distribution:
# %%global modulesdir %%(pkg-config --variable=modulesdir libcrypto)
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 Summary: A dynamic OpenSSL provider for IBMCA
%global with_openssl3 1
%endif
Summary: A dynamic OpenSSL engine for IBMCA
Name: openssl-ibmca Name: openssl-ibmca
Version: 2.3.1 Version: 2.3.1
Release: 2%{?dist} Release: 3%{?dist}
License: ASL 2.0 License: ASL 2.0
URL: https://github.com/opencryptoki URL: https://github.com/opencryptoki
Source0: https://github.com/opencryptoki/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/opencryptoki/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
@ -22,13 +12,13 @@ BuildRequires: make
BuildRequires: gcc BuildRequires: gcc
BuildRequires: libica-devel >= 4.0.0 BuildRequires: libica-devel >= 4.0.0
BuildRequires: automake libtool BuildRequires: automake libtool
BuildRequires: openssl BuildRequires: openssl >= 3.0.5
BuildRequires: perl(FindBin) BuildRequires: perl(FindBin)
ExclusiveArch: s390 s390x ExclusiveArch: s390 s390x
%description %description
A dynamic OpenSSL engine for IBMCA crypto hardware on IBM z Systems machines. A dynamic OpenSSL provider for IBMCA crypto hardware on IBM Z machines.
%prep %prep
@ -38,23 +28,13 @@ A dynamic OpenSSL engine for IBMCA crypto hardware on IBM z Systems machines.
%build %build
%configure --libdir=%{enginesdir} --with-libica-cex --with-libica-version=4 %configure --disable-engine --enable-provider --libdir=%{modulesdir} --with-libica-cex --with-libica-version=4
%make_build %make_build
%install %install
%make_install %make_install
rm -f %{buildroot}%{enginesdir}/*.la rm -f %{buildroot}%{modulesdir}/*.la
%if 0%{?with_openssl3}
# provider is built when openssl3 is available, fix its location
mkdir -p %{buildroot}%{modulesdir}
mv %{buildroot}%{enginesdir}/ibmca-provider.so %{buildroot}%{modulesdir}/ibmca-provider.so
%endif
pushd src/engine
sed -i -e 's|/usr/local/lib|%{enginesdir}|' openssl.cnf.sample
popd
# remove generated sample configs # remove generated sample configs
rm -rf %{buildroot}%{_datadir}/%{name} rm -rf %{buildroot}%{_datadir}/%{name}
@ -66,18 +46,16 @@ make check
%files %files
%license LICENSE %license LICENSE
%doc ChangeLog README.md src/engine/openssl.cnf.sample %doc ChangeLog README.md
%doc src/engine/ibmca-engine-opensslconfig
%doc src/provider/ibmca-provider-opensslconfig %doc src/provider/ibmca-provider-opensslconfig
%{enginesdir}/ibmca.so
%{_mandir}/man5/ibmca.5*
%if 0%{?with_openssl3}
%{modulesdir}/ibmca-provider.so %{modulesdir}/ibmca-provider.so
%{_mandir}/man5/ibmca-provider.5* %{_mandir}/man5/ibmca-provider.5*
%endif
%changelog %changelog
* Fri Jan 06 2023 Dan Horák <dan@danny.cz> - 2.3.1-3
- switch to building only the provider
* Fri Sep 30 2022 Dan Horák <dan@danny.cz> - 2.3.1-1 * Fri Sep 30 2022 Dan Horák <dan@danny.cz> - 2.3.1-1
- updated to 2.3.1 - updated to 2.3.1