From ef61689d1db441a9476c73a1c56761afe3fa2d92 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 15 Mar 2019 10:54:04 +0100 Subject: [PATCH] Initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + crossterm-fix-metadata.diff | 11 ++ rust-crossterm.spec | 201 ++++++++++++++++++++++++++++++++++++ sources | 1 + tests/.fmf/version | 1 + tests/provision.fmf | 5 + tests/tests.yml | 13 +++ 7 files changed, 233 insertions(+) create mode 100644 .gitignore create mode 100644 crossterm-fix-metadata.diff create mode 100644 rust-crossterm.spec create mode 100644 sources create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f40f77b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/crossterm-0.6.0.crate diff --git a/crossterm-fix-metadata.diff b/crossterm-fix-metadata.diff new file mode 100644 index 0000000..44c4e7c --- /dev/null +++ b/crossterm-fix-metadata.diff @@ -0,0 +1,11 @@ +--- crossterm-0.6.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ crossterm-0.6.0/Cargo.toml 2019-03-15T06:34:37.794001+01:00 +@@ -46,7 +46,7 @@ + optional = true + + [dependencies.crossterm_style] +-version = "0.1.0" ++version = "0.2.0" + optional = true + + [dependencies.crossterm_terminal] diff --git a/rust-crossterm.spec b/rust-crossterm.spec new file mode 100644 index 0000000..935baaa --- /dev/null +++ b/rust-crossterm.spec @@ -0,0 +1,201 @@ +# Generated by rust2rpm +# https://github.com/TimonPost/crossterm/issues/105 +%bcond_with check +%global debug_package %{nil} + +%global crate crossterm + +Name: rust-%{crate} +Version: 0.6.0 +Release: 1%{?dist} +Summary: Crossplatform terminal library for manipulating terminals + +# https://github.com/TimonPost/crossterm/issues/99 +License: MIT +URL: https://crates.io/crates/crossterm +Source: %{crates_source} +# Initial patched metadata +# Update crossterm_style to 0.2, https://github.com/TimonPost/crossterm/pull/94 +Patch0: crossterm-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(crossterm_cursor/default) >= 0.1.0 with crate(crossterm_cursor/default) < 0.2.0) +BuildRequires: (crate(crossterm_input/default) >= 0.1.0 with crate(crossterm_input/default) < 0.2.0) +BuildRequires: (crate(crossterm_screen/default) >= 0.1.0 with crate(crossterm_screen/default) < 0.2.0) +BuildRequires: (crate(crossterm_style/default) >= 0.2.0 with crate(crossterm_style/default) < 0.3.0) +BuildRequires: (crate(crossterm_terminal/default) >= 0.1.0 with crate(crossterm_terminal/default) < 0.2.0) +BuildRequires: (crate(crossterm_utils/default) >= 0.1.0 with crate(crossterm_utils/default) < 0.2.0) + +%global _description \ +An crossplatform terminal library for manipulating terminals. + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%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 + +%package -n %{name}+crossterm_cursor-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+crossterm_cursor-devel %{_description} + +This package contains library source intended for building other packages +which use "crossterm_cursor" feature of "%{crate}" crate. + +%files -n %{name}+crossterm_cursor-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+crossterm_input-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+crossterm_input-devel %{_description} + +This package contains library source intended for building other packages +which use "crossterm_input" feature of "%{crate}" crate. + +%files -n %{name}+crossterm_input-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+crossterm_screen-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+crossterm_screen-devel %{_description} + +This package contains library source intended for building other packages +which use "crossterm_screen" feature of "%{crate}" crate. + +%files -n %{name}+crossterm_screen-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+crossterm_style-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+crossterm_style-devel %{_description} + +This package contains library source intended for building other packages +which use "crossterm_style" feature of "%{crate}" crate. + +%files -n %{name}+crossterm_style-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+crossterm_terminal-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+crossterm_terminal-devel %{_description} + +This package contains library source intended for building other packages +which use "crossterm_terminal" feature of "%{crate}" crate. + +%files -n %{name}+crossterm_terminal-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+cursor-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+cursor-devel %{_description} + +This package contains library source intended for building other packages +which use "cursor" feature of "%{crate}" crate. + +%files -n %{name}+cursor-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+input-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+input-devel %{_description} + +This package contains library source intended for building other packages +which use "input" feature of "%{crate}" crate. + +%files -n %{name}+input-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+screen-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+screen-devel %{_description} + +This package contains library source intended for building other packages +which use "screen" feature of "%{crate}" crate. + +%files -n %{name}+screen-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+style-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+style-devel %{_description} + +This package contains library source intended for building other packages +which use "style" feature of "%{crate}" crate. + +%files -n %{name}+style-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+terminal-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+terminal-devel %{_description} + +This package contains library source intended for building other packages +which use "terminal" feature of "%{crate}" crate. + +%files -n %{name}+terminal-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +# XXX: Technically this is an API break, but nothing uses that function +# and it is not worth packaging old version of crossterm_style. +find -type f -exec sed -i -e "s/ColorType, //" {} + +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Fri Mar 15 2019 Igor Gnatenko - 0.6.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..9ecff81 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (crossterm-0.6.0.crate) = 557323d881973d3fc2706cb0a92b0ea21f21c28a16eb48b3a28b1b9b6641a8ba25af643838077a58f1efc033a8caf766f82c1830c1cee9057c34b1c9cfffb509 diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..503a97c --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- +standard-inventory-qcow2: + qemu: + # `cargo test` usually eats more than 1G. + m: 4G diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..754e02c --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/rust.git" + dest: rust + tests: + - rust/cargo-test + environment: + pkg: rust-crossterm