From 12b409567485422f3c908168d983a9500061257f Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 21 Nov 2017 06:55:58 +0100 Subject: [PATCH] initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + fd-find-6.0.0-fix-metadata.diff | 32 ++++++++++++++ rust-fd-find.spec | 74 +++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 108 insertions(+) create mode 100644 .gitignore create mode 100644 fd-find-6.0.0-fix-metadata.diff create mode 100644 rust-fd-find.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7ebf58f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/fd-find-6.0.0.crate diff --git a/fd-find-6.0.0-fix-metadata.diff b/fd-find-6.0.0-fix-metadata.diff new file mode 100644 index 0000000..10cae72 --- /dev/null +++ b/fd-find-6.0.0-fix-metadata.diff @@ -0,0 +1,32 @@ +--- fd-find-6.0.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ fd-find-6.0.0/Cargo.toml 2017-11-20T18:15:46.510274+01:00 +@@ -28,7 +28,7 @@ + name = "fd" + path = "src/main.rs" + [dependencies.ansi_term] +-version = "0.9" ++version = "0.10" + + [dependencies.regex] + version = "0.2" +@@ -43,7 +43,7 @@ + version = "1.6.2" + + [dependencies.ignore] +-version = "0.2" ++version = "0.3" + + [dependencies.atty] + version = "0.2" +@@ -62,11 +62,7 @@ + version = "2.26.0" + [target."cfg(all(unix, not(target_os = \"redox\")))".dependencies.libc] + version = "0.2" +-[target."cfg(windows)".dependencies.winapi] +-version = "0.2" + +-[target."cfg(windows)".dependencies.kernel32-sys] +-version = "0.2" + [badges.appveyor] + repository = "sharkdp/fd" + diff --git a/rust-fd-find.spec b/rust-fd-find.spec new file mode 100644 index 0000000..1d9cb84 --- /dev/null +++ b/rust-fd-find.spec @@ -0,0 +1,74 @@ +# Generated by rust2rpm +%bcond_without check + +%global crate fd-find + +Name: rust-%{crate} +Version: 6.0.0 +Release: 1%{?dist} +Summary: Simple, fast and user-friendly alternative to find + +License: MIT or ASL 2.0 +URL: https://crates.io/crates/fd-find +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Bump ansi_term to 0.10, ignore to 0.3: https://github.com/sharkdp/fd/pull/173 +Patch0: fd-find-6.0.0-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(ansi_term) >= 0.10.0 with crate(ansi_term) < 0.11.0) +BuildRequires: (crate(atty) >= 0.2.0 with crate(atty) < 0.3.0) +BuildRequires: (crate(clap) >= 2.26.0 with crate(clap) < 3.0.0) +BuildRequires: (crate(ignore) >= 0.3.0 with crate(ignore) < 0.4.0) +BuildRequires: (crate(lazy_static) >= 0.2.9 with crate(lazy_static) < 0.3.0) +BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) +BuildRequires: (crate(num_cpus) >= 1.6.2 with crate(num_cpus) < 2.0.0) +BuildRequires: (crate(regex) >= 0.2.0 with crate(regex) < 0.3.0) +BuildRequires: (crate(regex-syntax) >= 0.4.0 with crate(regex-syntax) < 0.5.0) +# [build-dependencies] +BuildRequires: (crate(clap) >= 2.26.0 with crate(clap) < 3.0.0) +BuildRequires: (crate(version_check) >= 0.1.3 with crate(version_check) < 0.2.0) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(diff) >= 0.1.0 with crate(diff) < 0.2.0) +BuildRequires: (crate(tempdir) >= 0.3.0 with crate(tempdir) < 0.4.0) +%endif + +%description +%{summary}. + +%package -n %{crate} +Summary: %{summary} + +%description -n %{crate} +%{summary}. + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build +find + +%install +%cargo_install +%{__install} -Dpm0644 -t %{buildroot}%{_mandir}/man1 doc/fd.1 + +%if %{with check} +%check +%cargo_test +%endif + +%files -n %{crate} +%license LICENSE-MIT LICENSE-APACHE +%doc README.md +%{_bindir}/fd +%{_mandir}/man1/fd.1* + +%changelog +* Mon Nov 20 2017 Igor Gnatenko - 6.0.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..c8724ab --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (fd-find-6.0.0.crate) = ab3d4ce268393792375b6ffe2e953ecd5953acf59a58f67dcbe984933cf39b2ac6840696c11f4abfa5720db29dd17a0ab4bbc5454e831f506756cabb9f79c13c