diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bcad8bb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/cryptoki-sys-*.crate diff --git a/cryptoki-sys-fix-metadata.diff b/cryptoki-sys-fix-metadata.diff new file mode 100644 index 0000000..9c4e6df --- /dev/null +++ b/cryptoki-sys-fix-metadata.diff @@ -0,0 +1,11 @@ +--- cryptoki-sys-0.1.0/Cargo.toml.orig 2021-03-26 13:42:54.675036628 +0000 ++++ cryptoki-sys-0.1.0/Cargo.toml 2021-03-26 13:42:56.843056301 +0000 +@@ -25,7 +25,7 @@ + [dependencies.libloading] + version = "0.7.0" + [build-dependencies.bindgen] +-version = "0.57.0" ++version = "0.56.0" + optional = true + + [features] diff --git a/rust-cryptoki-sys.spec b/rust-cryptoki-sys.spec new file mode 100644 index 0000000..47a01d1 --- /dev/null +++ b/rust-cryptoki-sys.spec @@ -0,0 +1,100 @@ +# Generated by rust2rpm 17 +%bcond_with check +%global debug_package %{nil} + +%global crate cryptoki-sys + +Name: rust-%{crate} +Version: 0.1.0 +Release: 1%{?dist} +Summary: FFI wrapper around the PKCS #11 API + +# Upstream license specification: Apache-2.0 +License: ASL 2.0 +URL: https://crates.io/crates/cryptoki-sys +Source: %{crates_source} +Patch0: cryptoki-sys-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +FFI wrapper around the PKCS #11 API.} + +%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 +%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 + +%package -n %{name}+bindgen-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bindgen-devel %{_description} + +This package contains library source intended for building other packages +which use "bindgen" feature of "%{crate}" crate. + +%files -n %{name}+bindgen-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+generate-bindings-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+generate-bindings-devel %{_description} + +This package contains library source intended for building other packages +which use "generate-bindings" feature of "%{crate}" crate. + +%files -n %{name}+generate-bindings-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 -a + +%build +%cargo_build -a + +%install +%cargo_install -a + +%if %{with check} +%check +%cargo_test -a +%endif + +%changelog +* Fri Mar 26 09:59:25 GMT 2021 Peter Robinson - 0.1.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..615896f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (cryptoki-sys-0.1.0.crate) = c6c9d9e37eba450610465dbcde3204751a7111230549702895352252c5b6c412974d9e61775d79008448b4b00a0c38d0dfbc7aa7b90a74d87d3ef8bb66a75df8