## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by rust2rpm 26 %bcond_without check %bcond bundled_rust_deps %{defined:rhel} %global crate vhost-device-vsock Name: rust-vhost-device-vsock Version: 0.2.0 Release: %autorelease Summary: Virtio-vsock device using the vhost-user protocol License: Apache-2.0 OR BSD-3-Clause URL: https://crates.io/crates/vhost-device-vsock Source0: %{crates_source} # Dealing with missing man page within the crate Source100: https://raw.githubusercontent.com/rust-vmm/vhost-device/c5ae1f38f2261036cfa237f01197517a5b4ae67d/%{crate}/%{crate}.1 %if %{with bundled_rust_deps} # The vendor tarball is created using cargo-vendor-filterer to remove Windows # related files (https://github.com/cgwalters/cargo-vendor-filterer) # spectool -g rust-vhost-device-vsock.spec # tar xzf vhost-device-vsock-%%{version}.crate # cd vhost-device-vsock-%%{version} # cargo vendor-filterer --platform x86_64-unknown-linux-gnu \ # --platform powerpc64le-unknown-linux-gnu \ # --platform aarch64-unknown-linux-gnu \ # --platform s390x-unknown-linux-gnu \ # --platform i686-unknown-linux-gnu # # Trying to make a reproducible tarball: # tar --sort=name \ # --mtime='2024-11-29' \ # --owner=0 --group=0 --numeric-owner \ # -Jcf rust-vhost-device-vsock-%%{version}-vendor.tar.xz vendor Source1: rust-vhost-device-vsock-%{version}-vendor.tar.xz %else # When building without bundled deps, align with rust deps included in the distribution. Patch: rust-vhost-device-vsock-update-deps.patch %endif # Package dependencies vmm-sys-util, virtio-bindings, virtio-vsock not built for s390x ExcludeArch: s390x # We depend on rust-vmm crates that don't support 32 bit targets ExcludeArch: %{ix86} %if %{with bundled_rust_deps} BuildRequires: rust-toolset # vendored crates dependencies: %else BuildRequires: cargo-rpm-macros >= 24 %endif %global _description %{expand: A virtio-vsock device using the vhost-user protocol.} %description %{_description} %package -n %{crate} Summary: %{summary} # Apache-2.0 # Apache-2.0 OR BSD-3-Clause # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-3-Clause # BSD-3-Clause OR Apache-2.0 # BSD-3-Clause OR MIT OR Apache-2.0 # MIT # MIT OR Apache-2.0 # MPL-2.0 # Unlicense OR MIT # Zlib OR Apache-2.0 OR MIT License: Apache-2.0 AND (Apache-2.0 OR BSD-3-Clause) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND (BSD-3-Clause OR Apache-2.0) AND (BSD-3-Clause OR MIT OR Apache-2.0) AND MIT AND (MIT OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE-APACHE %license LICENSE-BSD-3-Clause %license LICENSE.dependencies %if %{with bundled_rust_deps} %license cargo-vendor.txt %endif %doc CHANGELOG.md %doc README.md %{_bindir}/vhost-device-vsock %{_mandir}/man1/* %prep # Source1 is vendored dependencies %autosetup -n %{crate}-%{version_no_tilde} -p1 %{?with_bundled_rust_deps:-a1} %cargo_prep %{?with_bundled_rust_deps:-v vendor} %if %{without bundled_rust_deps} %generate_buildrequires %cargo_generate_buildrequires %endif %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %if %{with bundled_rust_deps} %cargo_vendor_manifest %endif %install %cargo_install mkdir -p %{buildroot}/%{_mandir}/man1 install -p -m 644 %{SOURCE100} %{buildroot}/%{_mandir}/man1/ %if %{with check} %check %cargo_test %endif %changelog ## START: Generated by rpmautospec * Mon Dec 02 2024 Sandro Bonazzola - 0.2.0-3 - Simplified vendoring * Thu Nov 14 2024 Sergio Lopez - 0.2.0-2 - Add a patch to update rust-vmm deps * Mon Aug 05 2024 Sandro Bonazzola - 0.2.0-1 - Initial import (fedora#2299655). ## END: Generated by rpmautospec