diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f70b0eb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/term_size-0.3.0.crate diff --git a/rust-term_size.spec b/rust-term_size.spec new file mode 100644 index 0000000..61514eb --- /dev/null +++ b/rust-term_size.spec @@ -0,0 +1,70 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate term_size + +Name: rust-%{crate} +Version: 0.3.0 +Release: 2%{?dist} +Summary: Functions for determining terminal sizes and dimensions + +License: MIT or ASL 2.0 +URL: https://crates.io/crates/term_size +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * clippy is nightly +Patch0: term_size-0.3.0-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(libc) >= 0.2.20 with crate(libc) < 0.3.0) + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Functions for determining terminal sizes and dimensions. + +This package contains library source intended for building other packages +which use %{crate} from crates.io. + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%files devel +%license LICENSE-MIT LICENSE-APACHE +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/{appveyor.yml,index.html,justfile} + +%changelog +* Sun Nov 05 2017 Igor Gnatenko - 0.3.0-2 +- Exclude unneeded files + +* Thu Jun 15 2017 Igor Gnatenko - 0.3.0-1 +- Update to 0.3.0 + +* Wed Jun 14 2017 Igor Gnatenko - 0.2.3-2 +- Port to use rust-packaging + +* Sat Feb 25 2017 Igor Gnatenko - 0.2.3-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..3bfe44d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (term_size-0.3.0.crate) = a466470372c09a6152f1fdaa3d631395410f4db938d0ba1db1695d66bf1620177f4dab4a9aade47de1d48019712072bfc91630cf4c088c56a5775f4d27dded8c diff --git a/term_size-0.3.0-fix-metadata.diff b/term_size-0.3.0-fix-metadata.diff new file mode 100644 index 0000000..087b3ac --- /dev/null +++ b/term_size-0.3.0-fix-metadata.diff @@ -0,0 +1,26 @@ +--- term_size-0.3.0/Cargo.toml 2017-04-09T20:37:48+02:00 ++++ term_size-0.3.0/Cargo.toml 2017-06-15T17:56:38.642986+02:00 +@@ -10,23 +10,13 @@ + license = "MIT OR Apache-2.0" + keywords = ["term", "terminal", "size", "width", "dimension"] + +-[dependencies] +-clippy = { version = "~0.0.112", optional = true } +- + [target.'cfg(not(target_os = "windows"))'.dependencies] + libc = "~0.2.20" + +-[target.'cfg(target_os = "windows")'.dependencies] +-kernel32-sys = "~0.2.2" +-winapi = "~0.2.8" +- + [features] + default = [] +-lints = ["clippy", "nightly"] +-nightly = [] # for building with nightly and unstable features + unstable = [] # for building with unstable features on stable Rust + debug = [] # for building with debug messages +-travis = ["lints", "nightly"] # for building with travis-cargo + + [profile.release] + opt-level = 3