From 934747a4f9fc7fd6d00503afc50a45f27f59f823 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Oct 27 2018 20:56:41 +0000 Subject: Adapt to new packaging Signed-off-by: Igor Gnatenko --- diff --git a/rust-utf8-ranges.spec b/rust-utf8-ranges.spec index 8d08077..0f24fc7 100644 --- a/rust-utf8-ranges.spec +++ b/rust-utf8-ranges.spec @@ -1,5 +1,5 @@ # Generated by rust2rpm -# Tests are run in infrastructure +# * Tests are run in infrastructure %bcond_with check %global debug_package %{nil} @@ -10,30 +10,51 @@ Version: 1.0.1 Release: 1%{?dist} Summary: Convert ranges of Unicode codepoints to UTF-8 byte ranges +# Upstream license specification: Unlicense/MIT License: Unlicense or MIT URL: https://crates.io/crates/utf8-ranges Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Exclude CI files, https://github.com/BurntSushi/utf8-ranges/pull/10 +Patch0: utf8-ranges-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) %endif -%description -%{summary}. +%global _description \ +Convert ranges of Unicode codepoints to UTF-8 byte ranges. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Convert ranges of Unicode codepoints to UTF-8 byte ranges. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license UNLICENSE LICENSE-MIT COPYING +%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 %{crate} from crates.io. +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 @@ -50,12 +71,6 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license UNLICENSE LICENSE-MIT COPYING -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/{Makefile,ctags.rust,session.vim} - %changelog * Thu Aug 30 2018 Josh Stone - 1.0.1-1 - Update to 1.0.1 diff --git a/utf8-ranges-fix-metadata.diff b/utf8-ranges-fix-metadata.diff new file mode 100644 index 0000000..587ee0e --- /dev/null +++ b/utf8-ranges-fix-metadata.diff @@ -0,0 +1,10 @@ +--- utf8-ranges-1.0.1/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ utf8-ranges-1.0.1/Cargo.toml 2018-10-27T22:56:20.298645+02:00 +@@ -21,6 +21,7 @@ + keywords = ["codepoint", "utf8", "automaton", "range"] + license = "Unlicense/MIT" + repository = "https://github.com/BurntSushi/utf8-ranges" ++exclude = ["/ci/*", "/.travis.yml", "/Makefile", "/ctags.rust", "/session.vim"] + [dev-dependencies.quickcheck] + version = "0.7" + default-features = false