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
7e9d52ecc4
commit
ae22c4001a
@ -56,6 +56,9 @@ Recommends: %{_sbindir}/zramctl
|
|||||||
%files -n %{crate}
|
%files -n %{crate}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%license LICENSE.dependencies
|
%license LICENSE.dependencies
|
||||||
|
%if 0%{?bundled_rust_deps}
|
||||||
|
%license cargo-vendor.txt
|
||||||
|
%endif
|
||||||
%doc zram-generator.conf.example
|
%doc zram-generator.conf.example
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{_systemdgeneratordir}/zram-generator
|
%{_systemdgeneratordir}/zram-generator
|
||||||
@ -104,10 +107,10 @@ use the "default" feature of the "%{crate}" crate.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
%autosetup -n %{crate}-%{version_no_tilde} -p1 %{?bundled_rust_deps:-a2}
|
||||||
cp -a %{S:1} .
|
cp -a %{S:1} .
|
||||||
%if 0%{?bundled_rust_deps}
|
%if 0%{?bundled_rust_deps}
|
||||||
%cargo_prep -V 2
|
%cargo_prep -v vendor
|
||||||
%else
|
%else
|
||||||
%cargo_prep
|
%cargo_prep
|
||||||
|
|
||||||
@ -123,8 +126,11 @@ echo 'systemd-rpm-macros'
|
|||||||
export SYSTEMD_UTIL_DIR=%{_systemd_util_dir}
|
export SYSTEMD_UTIL_DIR=%{_systemd_util_dir}
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
%cargo_build
|
%cargo_build
|
||||||
%{?cargo_license_summary}
|
%cargo_license_summary
|
||||||
%{?cargo_license} > LICENSE.dependencies
|
%{cargo_license} > LICENSE.dependencies
|
||||||
|
%if 0%{?bundled_rust_deps}
|
||||||
|
%cargo_vendor_manifest
|
||||||
|
%endif
|
||||||
%make_build SYSTEMD_SYSTEM_UNIT_DIR=%{_unitdir} SYSTEMD_SYSTEM_GENERATOR_DIR=%{_systemdgeneratordir} \
|
%make_build SYSTEMD_SYSTEM_UNIT_DIR=%{_unitdir} SYSTEMD_SYSTEM_GENERATOR_DIR=%{_systemdgeneratordir} \
|
||||||
systemd-service man
|
systemd-service man
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user