uadk_engine/uadk_engine.spec

104 lines
3.4 KiB
RPMSpec

Name: uadk_engine
Summary: UADK Accelerator Engine
Version: 1.2.0
Release: 1
License: Apache-2.0
Source: %{name}-%{version}.tar.gz
ExclusiveOS: linux
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Prefix: /usr/local/lib/engines-1.1
Conflicts: %{name} < %{version}-%{release}
Provides: %{name} = %{version}-%{release}
BuildRequires: libwd >= 2.3.21
BuildRequires: openssl-devel sed autoconf automake libtool
ExclusiveArch: aarch64
Patch0001: 0001-readme-export-PKG_CONFIG_PATH-on-openEuler.patch
Patch0002: 0002-uadk_engine-use-calloc-to-replace-malloc-memset.patch
Patch0003: 0003-v1-some-code-clean.patch
Patch0004: 0004-v1-fix-implicit-declaration-of-function-OPENSSL_call.patch
Patch0005: 0005-uadk-build-uadk_engine-only-if-openssl-1.1.patch
Patch0006: 0006-uadk-support-openssl-3.0.patch
Patch0007: 0007-README-update-openssl-3.0.patch
Patch0008: 0008-cipher-fix-double-free-error.patch
Patch0009: 0009-cipher-fix-set-key-error.patch
Patch0010: 0010-cipher-fix-async-hardware-computing-error.patch
%description
This package contains the UADK Accelerator Engine
%prep
%autosetup -n %{name} -p1
%build
autoreconf -i
chmod +x configure
./configure --enable-kae
make
%install
mkdir -p ${RPM_BUILD_ROOT}/usr/local/lib/engines-1.1
install -b -m755 src/.libs/uadk_engine.so.%{version} ${RPM_BUILD_ROOT}/usr/local/lib/engines-1.1
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(755,root,root)
/usr/local/lib/engines-1.1/uadk_engine.so.%{version}
%pre
if [ "$1" = "2" ] ; then #2: update
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so > /dev/null 2>&1 || true
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so.0 > /dev/null 2>&1 || true
fi
%post
if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update
ln -sf $RPM_INSTALL_PREFIX/uadk_engine.so.%{version} $RPM_INSTALL_PREFIX/uadk_engine.so
ln -sf $RPM_INSTALL_PREFIX/uadk_engine.so.%{version} $RPM_INSTALL_PREFIX/uadk_engine.so.0
fi
/sbin/ldconfig
%preun
if [ "$1" = "0" ] ; then #0: uninstall
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so > /dev/null 2>&1 || true
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so.0 > /dev/null 2>&1 || true
rm -f /var/log/uadk_engine.log > /dev/null 2>&1 || true
rm -f /var/log/uadk_engine.log.old > /dev/null 2>&1 || true
fi
%postun
/sbin/ldconfig
%changelog
* Tue Aug 22 2023 JiangShui Yang <yangjiangshui@h-partners.com> 1.2.0-1
- Backport uadk engine patch form v1.0.1 to 1.2.0
* Fri Aug 19 2023 JiangShui Yang <yangjiangshui@h-partners.com> 1.0.0-9
- Backport uadk engine patch for v1.0.1
* Fri Aug 19 2023 JiangShui Yang <yangjiangshui@h-partners.com> 1.0.0-8
- Eable debuginfo for fix strip
* Tue Jul 26 2022 Yang Shen <shenyang39@huawei.com> 1.0.0-7
- Backport uadk engine patch from v1.0.0 to v1.0.1
* Mon Mar 21 2022 linwenkai <linwenkai6@hisilicon.com> 1.0.0-6
- Backport uadk engine patch for v1.0.0
* Thu Mar 3 2022 linwenkai <linwenkai6@hisilicon.com> 1.0.0-5
- Backport uadk engine patch for v1.0.0
* Mon Feb 21 2022 linwenkai <linwenkai6@hisilicon.com> 1.0.0-4
- Backport uadk engine patch for v1.0.0
* Wed Jan 12 2022 linwenkai <linwenkai6@hisilicon.com> 1.0.0-3
- Backport uadk engine patch
* Fri Dec 10 2021 linwenkai <linwenkai6@hisilicon.com> 1.0.0-2
- Delete digest duplicate code
* Fri Dec 10 2021 linwenkai <linwenkai6@hisilicon.com> 1.0.0-1
- First Spec Version Include uadk_engine Code