From 3ece077448a314ae19bd8e8365e87a74d7002091 Mon Sep 17 00:00:00 2001 From: Penn Bauman Date: Mar 19 2025 05:00:46 +0000 Subject: initial packaging (version 0.1.1) --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c3f8333 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/random-trait-0.1.1.crate diff --git a/README.md b/README.md new file mode 100644 index 0000000..8e6c5ad --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# rust-random-trait + +The rust-random-trait package \ No newline at end of file diff --git a/random-trait-fix-missing-file.diff b/random-trait-fix-missing-file.diff new file mode 100644 index 0000000..603537b --- /dev/null +++ b/random-trait-fix-missing-file.diff @@ -0,0 +1,10 @@ +--- random-trait-0.1.1/Cargo.toml ++++ random-trait-0.1.1/Cargo.toml +@@ -16,7 +16,6 @@ version = "0.1.1" + authors = ["Elichai Turkel "] + include = ["**/*.rs", "Cargo.toml"] + description = "Rust library for a random trait meant to produce random generic types" +-readme = "README.md" + keywords = ["rand", "random", "random-rs", "rng"] + categories = ["algorithms", "no-std", "development-tools::testing", "cryptography"] + license = "MIT/Apache-2.0" diff --git a/rust-random-trait.spec b/rust-random-trait.spec new file mode 100644 index 0000000..a2621f6 --- /dev/null +++ b/rust-random-trait.spec @@ -0,0 +1,94 @@ +# Generated by rust2rpm 27 +%bcond check 1 +%global debug_package %{nil} + +%global crate random-trait + +Name: rust-random-trait +Version: 0.1.1 +Release: %autorelease +Summary: Rust library for a random trait meant to produce random generic types + +# Upstream license specification: MIT/Apache-2.0 +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/random-trait +Source: %{crates_source} +# Remove reference to README not in crate +Patch: random-trait-fix-missing-file.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +Rust library for a random trait meant to produce random generic types.} + +%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 +# FIXME: no license files detected +%{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}+doc-comment-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+doc-comment-devel %{_description} + +This package contains library source intended for building other packages which +use the "doc-comment" feature of the "%{crate}" crate. + +%files -n %{name}+doc-comment-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+u128-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+u128-devel %{_description} + +This package contains library source intended for building other packages which +use the "u128" feature of the "%{crate}" crate. + +%files -n %{name}+u128-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 -- --all-targets +%endif + +%changelog +%autochangelog