diff --git a/.gitignore b/.gitignore index 00cfb70..08ca464 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /markup5ever_rcdom-0.1.0.crate +/markup5ever_rcdom-0.2.0.crate diff --git a/markup5ever_rcdom-fix-metadata.diff b/markup5ever_rcdom-fix-metadata.diff new file mode 100644 index 0000000..8a7f6dd --- /dev/null +++ b/markup5ever_rcdom-fix-metadata.diff @@ -0,0 +1,14 @@ +--- markup5ever_rcdom-0.2.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ markup5ever_rcdom-0.2.0/Cargo.toml 2023-03-29T12:50:34.817858+00:00 +@@ -23,6 +23,11 @@ + ] + license = "MIT OR Apache-2.0" + repository = "https://github.com/servo/html5ever" ++exclude = [ ++ "/data", ++ "/html5lib-tests", ++ "/xml5lib-tests", ++] + + [lib] + path = "lib.rs" diff --git a/rust-markup5ever_rcdom.spec b/rust-markup5ever_rcdom.spec index 6226dd9..3f95f8a 100644 --- a/rust-markup5ever_rcdom.spec +++ b/rust-markup5ever_rcdom.spec @@ -1,27 +1,23 @@ -# Generated by rust2rpm 13 -# * Tests require external data +# Generated by rust2rpm 24 +# * test data is not included in published crates %bcond_with check %global debug_package %{nil} %global crate markup5ever_rcdom -Name: rust-%{crate} -Version: 0.1.0 +Name: rust-markup5ever_rcdom +Version: 0.2.0 Release: %autorelease Summary: Basic, unsupported DOM structure for use by tests in html5ever/xml5ever -# Upstream license specification: MIT / Apache-2.0 -# https://github.com/servo/html5ever/issues/412 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/markup5ever_rcdom Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * exclude tests and test data that is distributed with separate licenses +Patch: markup5ever_rcdom-fix-metadata.diff -ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Basic, unsupported DOM structure for use by tests in html5ever/xml5ever.} @@ -34,12 +30,14 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -47,11 +45,11 @@ 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. +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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/sources b/sources index 029bcfc..2970685 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (markup5ever_rcdom-0.1.0.crate) = 7c21836fcdd45bfdef7305327255291c92d75d3329798d31abab26297de8c381e41b4419fb7ac631310835d590b63751a63bdd87e2697ea3dfdd6599033433c7 +SHA512 (markup5ever_rcdom-0.2.0.crate) = bf21aee14ec41ea9ac5a5645285173394a561c34311f4b4a7f3c2e8fb32a54a777e4913c985daa2f693bb7b1aaf799d45ab9a6f359b900d2bb916b1ff376fbe4