From 470c5feeacc4d128a7b2c3796cc92e480cdddf5e Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Oct 27 2018 21:32:17 +0000 Subject: Adapt to new packaging Signed-off-by: Igor Gnatenko --- diff --git a/rust-same-file.spec b/rust-same-file.spec index 16984c1..bd2705b 100644 --- a/rust-same-file.spec +++ b/rust-same-file.spec @@ -7,7 +7,7 @@ Name: rust-%{crate} Version: 1.0.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Simple crate for determining whether two file paths point to the same file # Upstream license specification: Unlicense/MIT @@ -16,28 +16,46 @@ URL: https://crates.io/crates/same-file Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * No windows +# * Exclude CI files, https://github.com/BurntSushi/same-file/pull/44 Patch0: same-file-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(rand) >= 0.4.0 with crate(rand) < 0.5.0) +BuildRequires: (crate(rand/default) >= 0.4.0 with crate(rand/default) < 0.5.0) %endif -%description -%{summary}. +%global _description \ +A simple crate for determining whether two file paths point to the same file. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -A simple crate for determining whether two file paths point to the same file. +%description devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "%{crate}" crate. + +%files devel +%license COPYING LICENSE-MIT UNLICENSE +%doc README.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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -54,13 +72,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license COPYING LICENSE-MIT UNLICENSE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml - %changelog +* Sat Oct 27 2018 Igor Gnatenko - 1.0.3-3 +- Adapt to new packaging + * Sun Oct 07 2018 Igor Gnatenko - 1.0.3-2 - Run tests in infrastructure diff --git a/same-file-fix-metadata.diff b/same-file-fix-metadata.diff index 2c3cce8..162b8d6 100644 --- a/same-file-fix-metadata.diff +++ b/same-file-fix-metadata.diff @@ -1,7 +1,10 @@ ---- same-file-1.0.3/Cargo.toml 1969-12-31T16:00:00-08:00 -+++ same-file-1.0.3/Cargo.toml 2018-09-07T13:40:11.167633-07:00 -@@ -23,5 +23,3 @@ +--- same-file-1.0.3/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ same-file-1.0.3/Cargo.toml 2018-10-27T23:30:06.497811+02:00 +@@ -21,7 +21,6 @@ + keywords = ["same", "file", "equal", "inode"] + license = "Unlicense/MIT" repository = "https://github.com/BurntSushi/same-file" ++exclude = ["/.travis.yml", "/appveyor.yml"] [dev-dependencies.rand] version = "0.4" -[target."cfg(windows)".dependencies.winapi-util]