!9 sdma-dk:support sdma_tool

From: @zhangshuowen96 
Reviewed-by: @zju-hw, @zju-zzy 
Signed-off-by: @zju-zzy
This commit is contained in:
openeuler-ci-bot 2024-10-09 07:39:53 +00:00 committed by Gitee
commit 9a09612612
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 28 additions and 16 deletions

Binary file not shown.

View File

@ -1,42 +1,54 @@
Name: sdma-dk
Version: 1.0.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: SDMA user-mode driver
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_buildrootdir}/%{name}-%{version}-build
BuildRequires: make gcc autoconf automake libtool
BuildRequires: cmake make gcc gcc-c++ chrpath memkind-devel numactl-devel
ExclusiveArch: aarch64
%define debug_package %{nil}
%description
This pakege contains dynamic link library of sdma module: libsdma_dk.so
and test tool: sdma_tool, which support base function test and performance
test.
%prep
%autosetup
aclocal
autoconf
autoheader
libtoolize --automake --copy --debug --force
automake --add-missing
%setup -c -n %{name}-%{version}
%build
%configure --prefix=${RPM_BUILD_ROOT}/%{_libdir} --disable-static LDFLAGS="-s"
cd %{name}-%{version}
cmake ./
make
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
make install DESTDIR=%{buildroot}
find ${RPM_BUILD_ROOT}/%{_libdir}/ -name '*.so*'
%{__rm} -rf %{buildroot}
install -d %{buildroot}
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}
mkdir -p %{buildroot}%{_bindir}
cp ./%{name}-%{version}/lib/libsdma_dk.so %{buildroot}%{_libdir}
cp ./%{name}-%{version}/lib/mdk_sdma.h %{buildroot}%{_includedir}
cp ./%{name}-%{version}/tool/sdma_tool %{buildroot}%{_bindir}
chrpath -d %{buildroot}%{_bindir}/sdma_tool
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(755,root,root)
%{_libdir}/libsdma_dk*
/usr/include/*
%defattr(-,root,root)
%{_libdir}/libsdma_dk*
%{_includedir}/mdk_sdma.h
%{_bindir}/sdma_tool
%changelog
* Tue Oct 8 2024 zhangshuowen <zhangshuowen@hisilicon.com> - 1.0.0-5
- Type:feature
- DESC: add sdma_tool to support function test and performance test of sdma
* Sun Sep 15 2024 zhangyuyang <zhangyuyang31@huawei.com> - 1.0.0-4
- Type:bugfix
- DESC:fix bug code by review