代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/isula-rust-extensions 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#needsrootforbuild
%global __cargo_skip_build 0
%global _debugsource_packages 1
%global _debuginfo_subpackages 1
%define _unpackaged_files_terminate_build 0
%define debug_package %{nil}
Name: isula-rust-extensions
Version: 0.0.1
Release: 1
URL: https://gitee.com/openeuler/isula-rust-extensions
Source: %{name}-%{version}.tar.gz
Summary: isula-rust-extensions is a rust-extension library for iSulad.
Group: Application/System
License: Mulan PSL v2
ExclusiveArch: x86_64 aarch64
Patch0001: 0001-add-some-missing-c-rust-struct-transfer.patch
BuildRequires: rust
BuildRequires: cargo
BuildRequires: rust-packaging
BuildRequires: gcc
%description
Based on Rust programming language, rust-extension library for iSulad.
%package devel
Summary: Rust extensions for iSulad
Group: Libraries
ExclusiveArch: x86_64 aarch64
Requires: %{name} = %{version}-%{release}
%description devel
the %{name}-libs package contains rust-extension library for iSulad
%prep
%autosetup -p1
pushd nri
%cargo_prep
%cargo_generate_buildrequires
popd
%build
cd nri
sed -i '/\[source.crates-io\]/{n;d}' ./.cargo/config
sed -i '/\[source.local-registry\]/{n;d}' ./.cargo/config
sed -i '/\[source.local-registry\]/a directory = "vendor"' ./.cargo/config
%ifarch aarch64
sed -i 's/rustflags = \[/rustflags = \["-Clink-arg=-lgcc", "-Clink-arg=-lfdt", /g' ./.cargo/config
%endif
%cargo_build -a
%install
mkdir -p ${RPM_BUILD_ROOT}/{%{_libdir},%{_includedir}}
install -m 0644 nri/nri_plugin.h ${RPM_BUILD_ROOT}/%{_includedir}/nri_plugin.h
strip nri/target/release/libisula_nri.so
install -m 0755 nri/target/release/libisula_nri.so ${RPM_BUILD_ROOT}/%{_libdir}/libisula_nri.so
%files
%defattr(-,root, root,-)
%{_libdir}/*
%files devel
%defattr(-,root, root,-)
%{_includedir}/nri_plugin.h
%changelog
* Fri Aug 09 2024 jikai <jikai11@huawei.com> - 0.0.1-1
- Initial RPM release
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。