From f91be7a62a092c45560423847ea74463b3acd470 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Tue, 11 Jan 2022 17:31:23 +0100 Subject: [PATCH] Initial import (#2032563) --- .gitignore | 6 ++++ README.md | 3 -- rust-der_derive.spec | 75 ++++++++++++++++++++++++++++++++++++++++++++ sources | 3 ++ 4 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 rust-der_derive.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f10a75f --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/results_*/ +/*.src.rpm + +/der_derive-0.4.1.crate +/LICENSE-APACHE +/LICENSE-MIT diff --git a/README.md b/README.md deleted file mode 100644 index 1fb1e28..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-der_derive - -The rust-der_derive package diff --git a/rust-der_derive.spec b/rust-der_derive.spec new file mode 100644 index 0000000..e75d19c --- /dev/null +++ b/rust-der_derive.spec @@ -0,0 +1,75 @@ +# Generated by rust2rpm 20 +%bcond_without check +%global debug_package %{nil} + +%global crate der_derive + +Name: rust-%{crate} +Version: 0.4.1 +Release: %autorelease +Summary: Custom derives for Choice and Message traits from the der crate + +# Upstream license specification: Apache-2.0 OR MIT +License: ASL 2.0 or MIT +URL: https://crates.io/crates/der_derive +Source: %{crates_source} +# https://github.com/RustCrypto/formats/issues/283 +Source1: https://github.com/RustCrypto/formats/raw/04219e9/der/derive/LICENSE-APACHE +Source2: https://github.com/RustCrypto/formats/raw/04219e9/der/derive/LICENSE-MIT + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging + +%global _description %{expand: +Custom derive support for the `der` crate's `Choice` and `Message` traits.} + +%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 LICENSE-APACHE LICENSE-MIT +%doc CHANGELOG.md README.md +%{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 the "default" feature of the "%{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 +cp %{SOURCE1} %{SOURCE2} . + +%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..77d740a --- /dev/null +++ b/sources @@ -0,0 +1,3 @@ +SHA512 (der_derive-0.4.1.crate) = fa319e8a84d6f259b21c8734902b2f878c684c391c51c55d118ed1919a6e1db18419ab76e268eb56c426e38d5a79bdd0d08004c6599181989a963366aa9649ed +SHA512 (LICENSE-APACHE) = 5119f6179b85acc303cf17cd6dbe86193ccb831c3176f0cc2633e1b0ca9e832cac5fcff83992f181db06bb22d8ec273d4faec59dbbd897d242dd696c38d42830 +SHA512 (LICENSE-MIT) = 6cbdc5471b00cd385deae72f8a5358149774ed3b01b332b749c14f089b8cd8363aaeaaaaec5768fcb8d1a13a0a172a7c0526efc2dfd35d49cc503fda7c1a1782