From 15ef9ee3a9cb1144351b99690c55e5d89fcc13dc Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sun, 3 Jan 2021 18:52:32 +0100 Subject: [PATCH] Initial import Signed-off-by: Igor Raits --- .gitignore | 1 + rust-sct.spec | 80 +++++++++++++++++++++++++++++++++++++++++++ sct-fix-metadata.diff | 10 ++++++ sources | 1 + 4 files changed, 92 insertions(+) create mode 100644 .gitignore create mode 100644 rust-sct.spec create mode 100644 sct-fix-metadata.diff create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..02134a7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/sct-0.6.0.crate diff --git a/rust-sct.spec b/rust-sct.spec new file mode 100644 index 0000000..3cb1263 --- /dev/null +++ b/rust-sct.spec @@ -0,0 +1,80 @@ +# Generated by rust2rpm 17 +%bcond_without check +%global debug_package %{nil} + +%global crate sct + +Name: rust-%{crate} +Version: 0.6.0 +Release: 1%{?dist} +Summary: Certificate transparency SCT verification library + +# Upstream license specification: Apache-2.0/ISC/MIT +License: ASL 2.0 or ISC or MIT +URL: https://crates.io/crates/sct +Source: %{crates_source} +# Initial patched metadata +# * Exclude useless files, https://github.com/ctz/sct.rs/pull/5 +Patch0: sct-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +# ring is not available on those architectures +ExcludeArch: s390x %{power64} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Certificate transparency SCT verification library.} + +%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 LICENSE-MIT LICENSE-ISC LICENSE-APACHE +%doc 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 "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 +* Sun Jan 03 18:21:25 CET 2021 Igor Raits - 0.6.0-1 +- Initial package diff --git a/sct-fix-metadata.diff b/sct-fix-metadata.diff new file mode 100644 index 0000000..063148c --- /dev/null +++ b/sct-fix-metadata.diff @@ -0,0 +1,10 @@ +--- sct-0.6.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ sct-0.6.0/Cargo.toml 2021-01-03T17:23:55.347754+00:00 +@@ -21,6 +21,7 @@ + categories = ["network-programming", "cryptography"] + license = "Apache-2.0/ISC/MIT" + repository = "https://github.com/ctz/sct.rs" ++exclude = ["/admin/"] + [dependencies.ring] + version = "0.16.0" + diff --git a/sources b/sources new file mode 100644 index 0000000..0637d90 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (sct-0.6.0.crate) = fed46a52834b90495a8bc37993ad0754f20fedef6db442368559594d7184a12b43e31a7d42a595b032e54f8aa535cae0030d9eccc828c9df2fb457267e782b15