From 0f6e168a55fd751c727e57f8921fe1d7565ce37c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 13 Nov 2023 13:21:01 -0500 Subject: [PATCH] Initial package (close RHBZ#2249519) --- .gitignore | 1 + rust-snap.spec | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 71 insertions(+) create mode 100644 .gitignore create mode 100644 rust-snap.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e12252 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/snap-1.1.0.crate diff --git a/rust-snap.spec b/rust-snap.spec new file mode 100644 index 0000000..7e3b12e --- /dev/null +++ b/rust-snap.spec @@ -0,0 +1,69 @@ +# Generated by rust2rpm 25 +%bcond_without check +%global debug_package %{nil} + +%global crate snap + +Name: rust-snap +Version: 1.1.0 +Release: %autorelease +Summary: Pure Rust implementation of the Snappy compression algorithm + +License: BSD-3-Clause +URL: https://crates.io/crates/snap +Source: %{crates_source} + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +A pure Rust implementation of the Snappy compression algorithm. Includes +streaming compression and decompression.} + +%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}/COPYING +%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 + +%prep +%autosetup -n %{crate}-%{version} -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..775565d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (snap-1.1.0.crate) = 3d374ece917ab052b260e2a6b5bd509c94b8545601b910c964368612055ba5cf7b748f23873f2ba5adcc47f0f4eb6063e52f6d4ba186653d43e5f5d03c0363b9