commit ba922c1302a6e237d4d7c3312e1c8e70258783ff Author: Zbigniew Jędrzejewski-Szmek Date: Sun Jul 3 19:21:20 2022 +0200 First version diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e1b6ad0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/print_bytes-0.6.0.crate diff --git a/print_bytes-fix-metadata.diff b/print_bytes-fix-metadata.diff new file mode 100644 index 0000000..beaa656 --- /dev/null +++ b/print_bytes-fix-metadata.diff @@ -0,0 +1,12 @@ +--- print_bytes-0.6.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ print_bytes-0.6.0/Cargo.toml 2022-07-03T17:21:10.069497+00:00 +@@ -58,9 +58,3 @@ + [features] + specialization = [] + +-[target."cfg(windows)".dependencies.windows-sys] +-version = "0.36" +-features = [ +- "Win32_Foundation", +- "Win32_System_Console", +-] diff --git a/rust-print_bytes.spec b/rust-print_bytes.spec new file mode 100644 index 0000000..4d6498f --- /dev/null +++ b/rust-print_bytes.spec @@ -0,0 +1,87 @@ +# Generated by rust2rpm 21 +%bcond_without check +%global debug_package %{nil} + +%global crate print_bytes + +Name: rust-%{crate} +Version: 0.6.0 +Release: %autorelease +Summary: Print bytes as losslessly as possible + +# Upstream license specification: MIT OR Apache-2.0 +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/print_bytes +Source: %{crates_source} +# Initial patched metadata +Patch0: print_bytes-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Print bytes as losslessly as possible.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/COPYRIGHT +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/README.md +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%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 + +%package -n %{name}+specialization-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+specialization-devel %{_description} + +This package contains library source intended for building other packages which +use the "specialization" feature of the "%{crate}" crate. + +%files -n %{name}+specialization-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..e1f904d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (print_bytes-0.6.0.crate) = aba5ef8c4a05d7b71d8d7df73326b41c0fc9c408f3a383957a73a17887e75157f70038ad6761297c08b153932d2056cd603b29c586134fda38ad0546036d9cc8