summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--fd.spec42
-rw-r--r--sources1
3 files changed, 44 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..126b988 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/fd-9.0.0.tar.gz
diff --git a/fd.spec b/fd.spec
new file mode 100644
index 0000000..1342a1e
--- /dev/null
+++ b/fd.spec
@@ -0,0 +1,42 @@
+Name: fd
+Version: 9.0.0
+Release: 1%{?dist}
+Summary: fd is a program to find entries in your filesystem.
+
+License: MIT AND Apache-2.0
+URL: https://github.com/sharkdp/fd
+Source0: https://github.com/sharkdp/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+
+BuildRequires: cargo
+BuildRequires: rust
+BuildRequires: rust-std-static
+
+%description
+It is a simple, fast and user-friendly alternative to find. While it does not aim to support all of find's powerful functionality, it provides sensible (opinionated) defaults for a majority of use cases.
+
+%prep
+%autosetup -n %{name}-%{version} -p1
+mkdir cargo-home
+cat >cargo-home/config <<EOF
+[source.crates-io]
+replace-with = 'mirror'
+
+[source.mirror]
+registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"
+EOF
+
+
+%build
+export CARGO_HOME=$PWD/cargo-home
+cargo build --release
+
+
+%install
+install -pDm755 target/release/fd %{buildroot}%{_bindir}/fd
+
+%files
+%license LICENSE-MIT LICENSE-APACHE
+%{_bindir}/fd
+
+%changelog
+* Sat Jun 22 2024 yangpanda <gnaymuyi@163.com>
diff --git a/sources b/sources
new file mode 100644
index 0000000..5373237
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+3ee72ca77c9a6b0ad108f48338206f05 fd-9.0.0.tar.gz