diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a637ee0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/lsd-0.14.0.crate diff --git a/lsd-fix-metadata.diff b/lsd-fix-metadata.diff new file mode 100644 index 0000000..4051b44 --- /dev/null +++ b/lsd-fix-metadata.diff @@ -0,0 +1,11 @@ +--- lsd-0.14.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ lsd-0.14.0/Cargo.toml 2019-04-25T17:41:52.382509+00:00 +@@ -55,7 +55,7 @@ + version = "0.1.5" + + [dependencies.users] +-version = "0.8.0" ++version = "0.9.0" + [dev-dependencies.tempdir] + version = "0.3.7" + [build-dependencies.clap] diff --git a/rust-lsd.spec b/rust-lsd.spec new file mode 100644 index 0000000..1c7552e --- /dev/null +++ b/rust-lsd.spec @@ -0,0 +1,72 @@ +# Generated by rust2rpm +%bcond_without check + +%global crate lsd + +Name: rust-%{crate} +Version: 0.14.0 +Release: 1%{?dist} +Summary: ls command with a lot of pretty colors and some other stuff + +# Upstream license specification: Apache-2.0 +License: ASL 2.0 +URL: https://crates.io/crates/lsd +Source: %{crates_source} +# Initial patched metadata +# - Bump users to 0.9 https://github.com/Peltoche/lsd/pull/191 +Patch0: lsd-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(ansi_term/default) >= 0.11.0 with crate(ansi_term/default) < 0.12.0) +BuildRequires: (crate(chrono-humanize/default) >= 0.0.11 with crate(chrono-humanize/default) < 0.0.12) +BuildRequires: (crate(clap/color) >= 2.32.0 with crate(clap/color) < 3.0.0) +BuildRequires: (crate(clap/default) >= 2.32.0 with crate(clap/default) < 3.0.0) +BuildRequires: (crate(clap/suggestions) >= 2.32.0 with crate(clap/suggestions) < 3.0.0) +BuildRequires: (crate(clap/wrap_help) >= 2.32.0 with crate(clap/wrap_help) < 3.0.0) +BuildRequires: (crate(libc/default) >= 0.2.44 with crate(libc/default) < 0.3.0) +BuildRequires: (crate(lscolors/default) >= 0.5.0 with crate(lscolors/default) < 0.6.0) +BuildRequires: (crate(term_grid/default) >= 0.1.7 with crate(term_grid/default) < 0.2.0) +BuildRequires: (crate(terminal_size/default) >= 0.1.8 with crate(terminal_size/default) < 0.2.0) +BuildRequires: (crate(time/default) >= 0.1.40 with crate(time/default) < 0.2.0) +BuildRequires: (crate(unicode-width/default) >= 0.1.5 with crate(unicode-width/default) < 0.2.0) +BuildRequires: (crate(users/default) >= 0.9.0 with crate(users/default) < 0.10.0) +BuildRequires: (crate(version_check/default) >= 0.1.3 with crate(version_check/default) < 0.2.0) +%if %{with check} +BuildRequires: (crate(tempdir/default) >= 0.3.7 with crate(tempdir/default) < 0.4.0) +%endif + +%global _description \ +An ls command with a lot of pretty colors and some other stuff. + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%doc CHANGELOG.md CODEOWNERS README.md +%{_bindir}/lsd + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Thu Apr 25 2019 Robert-André Mauchin - 0.14.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..f28f29d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (lsd-0.14.0.crate) = 477b2d608e572bbdbf584520908f7a14157bd985a6ad24365594b6dade62327a0e0f1d0b41d379c7a57887db0c886b4d7bcefd0c98d029a96604a6668347beeb