Update Rust macro usage
The rust-toolset macros in RHEL 10 are now compatible with Fedora's in terms of handling vendoring and automatic generation of license information and bundled provides.
This commit is contained in:
parent
04c956ebf0
commit
a80772d8fd
13
nispor.spec
13
nispor.spec
@ -81,19 +81,24 @@ Requires: nispor%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|||||||
This package contains C binding of %{name}.
|
This package contains C binding of %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version_no_tilde} -p1
|
%autosetup -n %{name}-%{version_no_tilde} -p1 %{?rhel:-a1}
|
||||||
# Drop the upstream fix on SONAME as fedora %cargo_xxx marcos override it,
|
# Drop the upstream fix on SONAME as fedora %cargo_xxx marcos override it,
|
||||||
# we use patchelf to set the SONAME.
|
# we use patchelf to set the SONAME.
|
||||||
rm .cargo/config.toml
|
rm .cargo/config.toml
|
||||||
|
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
%cargo_prep -V 1
|
%cargo_prep -v vendor
|
||||||
%else
|
%else
|
||||||
%cargo_prep
|
%cargo_prep
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cargo_build
|
%cargo_build
|
||||||
|
%cargo_license_summary
|
||||||
|
%{cargo_license} > LICENSE.dependencies
|
||||||
|
%if 0%{?rhel}
|
||||||
|
%cargo_vendor_manifest
|
||||||
|
%endif
|
||||||
|
|
||||||
pushd src/python
|
pushd src/python
|
||||||
%py3_build
|
%py3_build
|
||||||
@ -127,6 +132,10 @@ patchelf --set-soname libnispor.so.1 \
|
|||||||
%files
|
%files
|
||||||
%doc AUTHORS CHANGELOG DEVEL.md README.md
|
%doc AUTHORS CHANGELOG DEVEL.md README.md
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
%license LICENSE.dependencies
|
||||||
|
%if 0%{?rhel}
|
||||||
|
%license cargo-vendor.txt
|
||||||
|
%endif
|
||||||
%{_bindir}/npc
|
%{_bindir}/npc
|
||||||
%{_libdir}/libnispor.so.*
|
%{_libdir}/libnispor.so.*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user