From 0de37ca4ef2c346c1455115c0f7464c7693a3759 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 26 Oct 2018 16:57:12 +0200 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- byteorder-fix-metadata.diff | 10 ++++++ rust-byteorder.spec | 70 +++++++++++++++++++++++++++++-------- 2 files changed, 66 insertions(+), 14 deletions(-) create mode 100644 byteorder-fix-metadata.diff diff --git a/byteorder-fix-metadata.diff b/byteorder-fix-metadata.diff new file mode 100644 index 0000000..0d5f4fa --- /dev/null +++ b/byteorder-fix-metadata.diff @@ -0,0 +1,10 @@ +--- byteorder-1.2.6/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ byteorder-1.2.6/Cargo.toml 2018-10-26T16:58:00.732291+02:00 +@@ -22,6 +22,7 @@ + categories = ["encoding", "parsing"] + license = "Unlicense/MIT" + repository = "https://github.com/BurntSushi/byteorder" ++exclude = ["/ci/*"] + [profile.bench] + opt-level = 3 + diff --git a/rust-byteorder.spec b/rust-byteorder.spec index 4b6cf3c..2b3048e 100644 --- a/rust-byteorder.spec +++ b/rust-byteorder.spec @@ -7,34 +7,79 @@ Name: rust-%{crate} Version: 1.2.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for reading/writing numbers in big-endian and little-endian +# Upstream license specification: Unlicense/MIT License: Unlicense or MIT URL: https://crates.io/crates/byteorder Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Exclude CI files, https://github.com/BurntSushi/byteorder/pull/133 +Patch0: byteorder-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging %if %{with check} -# [dev-dependencies] BuildRequires: (crate(quickcheck) >= 0.7.0 with crate(quickcheck) < 0.8.0) -BuildRequires: (crate(rand) >= 0.5.0 with crate(rand) < 0.6.0) +BuildRequires: (crate(rand/default) >= 0.5.0 with crate(rand/default) < 0.6.0) %endif -%description -%{summary}. +%global _description \ +Library for reading/writing numbers in big-endian and little-endian. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Library for reading/writing numbers in big-endian and little-endian. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license COPYING UNLICENSE LICENSE-MIT +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ + +%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 %{crate} from crates.io. +which use "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+i128-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+i128-devel %{_description} + +This package contains library source intended for building other packages +which use "i128" feature of "%{crate}" crate. + +%files -n %{name}+i128-devel +%ghost %{cargo_registry}/%{crate}-%{version}/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 "std" feature of "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -51,13 +96,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license COPYING UNLICENSE LICENSE-MIT -%doc README.md CHANGELOG.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/ci - %changelog +* Fri Oct 26 2018 Igor Gnatenko - 1.2.6-2 +- Adapt to new packaging + * Thu Aug 30 2018 Josh Stone - 1.2.6-1 - Update to 1.2.6