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
891b68c7de
commit
96981de902
|
@ -105,10 +105,10 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
This package provides extra utilities based on the librsvg library.
|
This package provides extra utilities based on the librsvg library.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n librsvg-%{version} -p1
|
%autosetup -n librsvg-%{version} -p1 %{?bundled_rust_deps:-a1}
|
||||||
%if 0%{?bundled_rust_deps}
|
%if 0%{?bundled_rust_deps}
|
||||||
# Use the bundled deps
|
# Use the bundled deps
|
||||||
%cargo_prep -V 1
|
%cargo_prep -v vendor
|
||||||
%else
|
%else
|
||||||
# No bundled deps
|
# No bundled deps
|
||||||
rm -vrf vendor .cargo Cargo.lock
|
rm -vrf vendor .cargo Cargo.lock
|
||||||
|
@ -130,9 +130,10 @@ export CARGO="%__cargo"
|
||||||
--enable-vala
|
--enable-vala
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
%if %{undefined rhel}
|
|
||||||
%cargo_license_summary
|
%cargo_license_summary
|
||||||
%{cargo_license} > LICENSE.dependencies
|
%{cargo_license} > LICENSE.dependencies
|
||||||
|
%if 0%{?bundled_rust_deps}
|
||||||
|
%cargo_vendor_manifest
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
@ -156,8 +157,9 @@ rm -f %{buildroot}%{_pkgdocdir}/COMPILING.md
|
||||||
%files
|
%files
|
||||||
%doc code-of-conduct.md NEWS README.md
|
%doc code-of-conduct.md NEWS README.md
|
||||||
%license COPYING.LIB
|
%license COPYING.LIB
|
||||||
%if %{undefined rhel}
|
|
||||||
%license LICENSE.dependencies
|
%license LICENSE.dependencies
|
||||||
|
%if 0%{?bundled_rust_deps}
|
||||||
|
%license cargo-vendor.txt
|
||||||
%endif
|
%endif
|
||||||
%{_libdir}/librsvg-2.so.*
|
%{_libdir}/librsvg-2.so.*
|
||||||
%dir %{_libdir}/girepository-1.0
|
%dir %{_libdir}/girepository-1.0
|
||||||
|
|
Loading…
Reference in New Issue