diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cf33c27 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/ff-0.13.0.crate diff --git a/README.md b/README.md deleted file mode 100644 index 814e7e9..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-ff - -The rust-ff package diff --git a/ff-fix-metadata.diff b/ff-fix-metadata.diff new file mode 100644 index 0000000..19deb45 --- /dev/null +++ b/ff-fix-metadata.diff @@ -0,0 +1,34 @@ +--- ff-0.13.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ ff-0.13.0/Cargo.toml 2023-05-30T13:41:50.905818+00:00 +@@ -25,22 +25,10 @@ + all-features = true + rustdoc-args = ["--cfg", "docsrs"] + +-[[test]] +-name = "derive" +-required-features = ["derive"] + [dependencies.bitvec] + version = "1" + optional = true + default-features = false +- +-[dependencies.byteorder] +-version = "1" +-optional = true +-default-features = false +- +-[dependencies.ff_derive] +-version = "0.13" +-optional = true + + [dependencies.rand_core] + version = "0.6" +@@ -60,8 +48,6 @@ + alloc = [] + bits = ["bitvec"] + default = ["bits", "std"] +-derive = ["byteorder", "ff_derive"] +-derive_bits = ["bits", "ff_derive/bits"] + std = ["alloc"] + [badges.maintenance] + status = "actively-developed" diff --git a/rust-ff.spec b/rust-ff.spec new file mode 100644 index 0000000..5435ce3 --- /dev/null +++ b/rust-ff.spec @@ -0,0 +1,123 @@ +# Generated by rust2rpm 24 +# * missing dev-dependency: blake2b_simd ^1 +%bcond_with check +%global debug_package %{nil} + +%global crate ff + +Name: rust-ff +Version: 0.13.0 +Release: %autorelease +Summary: Library for building and interfacing with finite fields + +# Upstream license specification: MIT/Apache-2.0 +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/ff +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * drop unused derive features with missing dependencies +Patch: ff-fix-metadata.diff + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Library for building and interfacing with finite fields.} + +%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-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/CHANGELOG.md +%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 + +%package -n %{name}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages which +use the "alloc" feature of the "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+bits-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bits-devel %{_description} + +This package contains library source intended for building other packages which +use the "bits" feature of the "%{crate}" crate. + +%files -n %{name}+bits-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+bitvec-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bitvec-devel %{_description} + +This package contains library source intended for building other packages which +use the "bitvec" feature of the "%{crate}" crate. + +%files -n %{name}+bitvec-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-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/sources b/sources new file mode 100644 index 0000000..ec5d1ea --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (ff-0.13.0.crate) = eab19938f5a2cddb0fcc78b0724efd788aab7f17f04c482e0d06acac4d1cef2bcbfc74d6e4b2d9f535f9c955bf39c2153e010bdd2fa72d6d637d44baf8bf5f63