# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} %global crate virtio-vsock Name: rust-virtio-vsock Version: 0.6.0 Release: %autorelease Summary: Virtio vsock device implementation License: Apache-2.0 OR BSD-3-Clause URL: https://crates.io/crates/virtio-vsock Source0: %{crates_source} # Missing license files within the crate. # Reported upstream: https://github.com/rust-vmm/vm-virtio/issues/298 Source100: https://raw.githubusercontent.com/rust-vmm/vm-virtio/main/LICENSE-APACHE Source101: https://raw.githubusercontent.com/rust-vmm/vm-virtio/main/LICENSE-BSD-3-Clause # Package dependencies vmm-sys-util and virtio-bindings not built for s390x ExcludeArch: s390x BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Virtio vsock device implementation.} %description %{_description} %package devel Summary: %{summary} BuildArch: noarch # Package must own all directories that it creates. # Note: Directories without known owners: # /usr/share, /usr/share/cargo/registry, /usr/share/cargo, /usr/share/licenses, /usr # /usr/share/cargo/registry is owned by cargo, all the others are pulled in by its dependency tree. Requires: cargo %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %dir %{crate_instdir} %{crate_instdir}/src/ %{crate_instdir}/*.toml %{crate_instdir}/.cargo-checksum.json %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/README.md # dealing with missing license files in the crate %license docs/LICENSE-APACHE %license docs/LICENSE-BSD-3-Clause %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch # Package must own all directories that it creates. # Note: Directories without known owners: /usr/share/cargo/registry/virtio-vsock-0.6.0 Requires: %{name}-devel%{?_isa} = %{version}-%{release} %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml # dealing with missing license files in the crate %license docs/LICENSE-APACHE %license docs/LICENSE-BSD-3-Clause %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install # dealing with missing license files in the crate mkdir -p ./docs cp -p %{SOURCE100} %{SOURCE101} ./docs/ %if %{with check} %check %cargo_test %endif %changelog %autochangelog