diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..870b488 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/gix-date-0.5.0.crate diff --git a/gix-date-fix-metadata.diff b/gix-date-fix-metadata.diff new file mode 100644 index 0000000..0fbe09d --- /dev/null +++ b/gix-date-fix-metadata.diff @@ -0,0 +1,13 @@ +--- gix-date-0.5.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ gix-date-0.5.0/Cargo.toml 2023-06-04T21:09:51.775637+00:00 +@@ -38,10 +37,6 @@ + version = "1.3.0" + features = ["std"] + default-features = false +- +-[dependencies.document-features] +-version = "0.2.0" +-optional = true + + [dependencies.itoa] + version = "1.0.1" diff --git a/rust-gix-date.spec b/rust-gix-date.spec new file mode 100644 index 0000000..3541210 --- /dev/null +++ b/rust-gix-date.spec @@ -0,0 +1,90 @@ +# Generated by rust2rpm 24 +%bcond_without check +%global debug_package %{nil} + +%global crate gix-date + +Name: rust-gix-date +Version: 0.5.0 +Release: %autorelease +Summary: Parse dates the way git does + +# Upstream license specification: MIT/Apache-2.0 +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/gix-date +Source: %{crates_source} +# This will not be required in the next release --> https://github.com/Byron/gitoxide/pull/863 +Source1: https://raw.githubusercontent.com/Byron/gitoxide/%{crate}-v%{version}/LICENSE-APACHE +Source2: https://raw.githubusercontent.com/Byron/gitoxide/%{crate}-v%{version}/LICENSE-MIT +# Manually created patch for downstream crate metadata changes +# * Disable feature that is only required for building documentation +Patch: gix-date-fix-metadata.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +A WIP crate of the gitoxide project parsing dates the way git does.} + +%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-MIT +%license LICENSE-APACHE +%doc %{crate_instdir}/CHANGELOG.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}+serde-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-devel %{_description} + +This package contains library source intended for building other packages which +use the "serde" feature of the "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep +cp -pav %{SOURCE1} . +cp -pav %{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..afe9bde --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (gix-date-0.5.0.crate) = d6ce8b185f9d6edb3392d91a481eeb04a39d61e0bc3ae3ee3d59be9c77f502d444cad089e743af4e7638b815e36669a9372d50fb160b68b61373028958f32288