Init libgmem with openeuler/libgmem commit ""

This commit is contained in:
Yang Yanchao 2023-08-07 00:01:39 +08:00
parent b816d5dcff
commit 4d40735c37
2 changed files with 65 additions and 0 deletions

BIN
libgmem-1.0.tar.gz Normal file

Binary file not shown.

65
libgmem.spec Normal file
View File

@ -0,0 +1,65 @@
Name: libgmem
Version: 1.0
Release: 1
Summary: Library of Generalized Memory Management
License: MulanPSL-2.0
URL: https://gitee.com/openeuler/libgmem
Source0: https://github.com/GMEM-Team/libgmem/%{name}-%{version}.tar.gz
BuildRequires: autoconf automake libtool
BuildRequires: gcc glibc-devel make
#BuildRequires: Ascend-cann-toolkit
Requires: autoconf automake libtool gcc glibc-devel make
%description
libgmem is the abstract layer of GMEM(Generalized Memory Management) user-mode interface,
which encapsulates some memory characteristics and semantics of GMEM
%package devel
Summary: Header files for libgmem development
Requires: %{name} = %{version}-%{release}
%description devel
The kmod-devel package provides header files used for loading or unloading
kernel modules.
%prep
%autosetup -p1 -n %{name}-%{version}
%install
#%make_install
mkdir -p $RPM_BUILD_ROOT%{_includedir}/
mkdir -p $RPM_BUILD_ROOT%{_usrsrc}/
install -m 0644 include/libgmem.h $RPM_BUILD_ROOT%{_includedir}/
cp -r * $RPM_BUILD_ROOT%{_usrsrc}/
%delete_la
%files
#%{_libdir}/%{name}.so.*
%{_usrsrc}/*
%files devel
#%{_libdir}/%{name}.so
%{_includedir}/libgmem.h
%post
cd %{_usrsrc}/
sh ./autogen.sh
./configure --with-device=Ascend
make V=1
make install
/sbin/ldconfig
cd -
%postun
cd %{_usrsrc}/
make uninstall
/sbin/ldconfig
cd -
%changelog
* Sun Aug 13 2023 Yang Yanchao <yangyanchao6@huawei.com> - 1.0-1
- Init Package