Initial Fedora package

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
epel9
Michel Alexandre Salim 2 years ago
parent 09edc998de
commit 843011aba9
No known key found for this signature in database
GPG Key ID: 8B229D2F7CCC04F2

1
.gitignore vendored

@ -0,0 +1 @@
/pore-0.1.6.crate

@ -0,0 +1,27 @@
--- pore-0.1.6/Cargo.toml 1970-01-01T00:00:01+00:00
+++ pore-0.1.6/Cargo.toml 2022-12-28T21:24:29.408792+00:00
@@ -31,9 +31,6 @@
[dependencies.console]
version = "0.15.0"
-[dependencies.copy_dir]
-version = "0.1.2"
-
[dependencies.dirs]
version = "4.0.0"
@@ -50,11 +47,11 @@
[dependencies.indoc]
version = "1.0"
-[dependencies.isatty]
-version = "0.1.9"
+[dependencies.atty]
+version = "0.2"
[dependencies.joinery]
-version = "2.1.0"
+version = "3.0"
[dependencies.lazy_static]
version = "1.4.0"

@ -0,0 +1,11 @@
--- a/src/depot.rs
+++ b/src/depot.rs
@@ -104,7 +104,7 @@ impl Depot {
)
.context(format!("failed to create directory {:?}", dst))?;
- copy_dir::copy_dir(&src, &dst).context(format!("failed to copy directory {:?} to {:?}", src, dst))?;
+ std::process::Command::new("cp").arg("-pr").arg(&src).arg(&dst).spawn().context(format!("failed to copy directory {:?} to {:?}", src, dst))?;
Ok(())
}

@ -0,0 +1,19 @@
--- a/src/main.rs
+++ b/src/main.rs
@@ -43,6 +43,7 @@ use std::path::{Path, PathBuf};
use std::sync::Arc;
use anyhow::{Context, Error};
+use atty::Stream;
use joinery::Joinable;
use progpool::{Job, Pool};
@@ -792,7 +793,7 @@ fn main() {
};
let mut pool = Pool::with_size(pool_size);
- let update_checker = if config.update_check && isatty::stdout_isatty() {
+ let update_checker = if config.update_check && atty::is(Stream::Stdout) {
Some(UpdateChecker::fetch())
} else {
None

@ -0,0 +1,90 @@
# Generated by rust2rpm 23
%bcond_without check
%global crate pore
Name: rust-pore
Version: 0.1.6
Release: %autorelease
Summary: Performance oriented reimplementation of repo
License: Apache-2.0
URL: https://crates.io/crates/pore
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# - drop copy_dir
# - replace isatty with atty
# - bump joinery to 3.0
Patch: pore-fix-metadata.diff
# Based on merged https://github.com/jmgao/pore/pull/98
Patch: pore-replace-isatty.diff
# Not upstreamed yet as the current patch is POSIX only
Patch: pore-remove-copy_dir.diff
BuildRequires: rust-packaging >= 21
%global _description %{expand:
Performance oriented reimplementation of repo.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
License: Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR MIT OR Zlib) AND 0BSD AND BSD-3-Clause AND MIT AND GPL-2.0-only WITH GCC-exception-2.0 AND Unicode-DFS-2016
# LICENSE.dependencies contains a full license breakdown
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%license LICENSE.dependencies
%doc README.md
%{_bindir}/pore
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%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 the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%{cargo_license} > LICENSE.dependencies
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog

@ -0,0 +1 @@
SHA512 (pore-0.1.6.crate) = aaa92a82f6d6340ee6ea911989f6bd3554ec7b4108144d1d3e699ed8c9fd81274d33d15b203dfa4a2e06123471bc23b25a35b95abd537003bc784c25a4dca343
Loading…
Cancel
Save