uadk_engine/uadk_engine.spec
JangShui Yang 9dd90cee97 Backport uadk engine patch
(cherry picked from commit 793613e405197982521d4079047f8ea5468483bc)
2024-04-07 18:59:10 +08:00

117 lines
3.7 KiB
RPMSpec

Name: uadk_engine
Summary: UADK Accelerator Engine
Version: 1.3.0
Release: 2
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.6.0
BuildRequires: compat-openssl11-devel sed autoconf automake libtool numactl-devel
ExclusiveArch: aarch64
Patch0001: 0001-v1-dh-add-iova_map-and-iova_unmap-ops.patch
Patch0002: 0002-uadk_util-fix-clang-build-error.patch
Patch0003: 0003-uadk_engine-add-secure-compilation-option.patch
Patch0004: 0004-uadk_engine-cleanup-code-style-of-async-functions.patch
Patch0005: 0005-cipher-cleanup-repeated-function-invoking.patch
Patch0006: 0006-digest-add-ctx-allocation-check.patch
Patch0007: 0007-sm2-add-ctx-allocation-check.patch
%description
This package contains the UADK Accelerator Engine
%global debug_package %{nil}
%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
* Sun Apr 7 2024 JiangShui Yang <yangjiangshui@h-partners.com> 1.2.0-1
- Backport uadk engine patch
* Mon Mar 20 2023 linwenkai <linwenkai6@hisilicon.com> 1.0.0-10
- Backport uadk engine build patch
* Thu Feb 9 2023 linwenkai <linwenkai6@hisilicon.com> 1.0.0-9
- Fix uadk engine build compatiable problem
* Mon Jan 22 2024 Zhangfei Gao <zhangfei.gao@linaro.org> 1.3.0-1
- uadk_eingine: update to 1.3.0
* 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
* Mon Mar 20 2023 linwenkai <linwenkai6@hisilicon.com> 1.0.0-10
- Backport uadk engine build patch
* Thu Feb 9 2023 linwenkai <linwenkai6@hisilicon.com> 1.0.0-9
- Fix uadk engine build compatiable problem
* Fri Dec 16 2022 JiangShui Yang <yangjiangshui@h-partners.com> 1.0.0-8
- Backport uadk engine patch for v1.0.1
* Tus 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