diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..78cb468 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/below-config-0.3.0.crate diff --git a/below-config-fix-metadata.diff b/below-config-fix-metadata.diff new file mode 100644 index 0000000..5f4f66b --- /dev/null +++ b/below-config-fix-metadata.diff @@ -0,0 +1,10 @@ +--- below-config-0.3.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ below-config-0.3.0/Cargo.toml 2021-07-29T21:20:40.995503+00:00 +@@ -29,6 +29,6 @@ + features = ["derive", "rc"] + + [dependencies.toml] +-version = "=0.5.7" ++version = "0.5.8" + [dev-dependencies.tempdir] + version = "0.3" diff --git a/rust-below-config.spec b/rust-below-config.spec new file mode 100644 index 0000000..dd8a7ab --- /dev/null +++ b/rust-below-config.spec @@ -0,0 +1,75 @@ +# Generated by rust2rpm 18 +%bcond_without check +%global debug_package %{nil} + +%global crate below-config + +Name: rust-%{crate} +Version: 0.3.0 +Release: %autorelease +Summary: Configerations for below + +# Upstream license specification: Apache-2.0 +License: ASL 2.0 +URL: https://crates.io/crates/below-config +Source: %{crates_source} +# Bump toml to 0.5.8 +Patch0: below-config-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Configerations for below.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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..06e29b4 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (below-config-0.3.0.crate) = c2308252dbc285c4df6bd31129d86c9f58887ab9e10dbc45d8ad57bd9170378bcea0ec753d19f0a47811b0434e0b759a7ae667e42150a1f3587d2b81de940146