diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b9f7f1e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/rustls-pemfile-0.3.0.crate diff --git a/rust-rustls-pemfile.spec b/rust-rustls-pemfile.spec new file mode 100644 index 0000000..ba1b35f --- /dev/null +++ b/rust-rustls-pemfile.spec @@ -0,0 +1,77 @@ +# Generated by rust2rpm 21 +%bcond_without check +%global debug_package %{nil} + +%global crate rustls-pemfile + +Name: rust-%{crate} +Version: 0.3.0 +Release: %autorelease +Summary: Basic .pem file parser for keys and certificates + +# Upstream license specification: Apache-2.0/ISC/MIT +License: ASL 2.0 or ISC or MIT +URL: https://crates.io/crates/rustls-pemfile +Source: %{crates_source} +# Initial patched metadata +# Drop criterion dev-dependency (only used for benchmarks) +Patch0: rustls-pemfile-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Basic .pem file parser for keys and certificates.} + +%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}/LICENSE +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-ISC +%license %{crate_instdir}/LICENSE-MIT +%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_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/rustls-pemfile-fix-metadata.diff b/rustls-pemfile-fix-metadata.diff new file mode 100644 index 0000000..a637fab --- /dev/null +++ b/rustls-pemfile-fix-metadata.diff @@ -0,0 +1,8 @@ +--- rustls-pemfile-0.3.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ rustls-pemfile-0.3.0/Cargo.toml 2022-03-24T15:18:30.710185+00:00 +@@ -26,5 +26,3 @@ + harness = false + [dependencies.base64] + version = "0.13.0" +-[dev-dependencies.criterion] +-version = "0.3" diff --git a/sources b/sources new file mode 100644 index 0000000..d566e41 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rustls-pemfile-0.3.0.crate) = 62c35aaae1685b5b274cb7de8a12770a1564b0862da9544f4445b1402b0a494619714fb9bb50909c7fdfe32ee5f8bdcfbea237b2fde843e5af9ea1393c206b50