summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-06-22 15:06:54 +0000
committerCoprDistGit <infra@openeuler.org>2024-06-22 15:06:54 +0000
commit4ea59d74ea55fdd0e7c456b9b08d54083953be35 (patch)
treefc9136b2ff6225961b3b3b49370c3fa83c7b9538
parentccd7a04058a449765bee90a1ecd3e27f53731024 (diff)
automatic import of fzf
-rw-r--r--.gitignore1
-rw-r--r--fzf.spec52
-rw-r--r--sources1
3 files changed, 54 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..60edf71 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/fzf-0.53.0.tar.gz
diff --git a/fzf.spec b/fzf.spec
new file mode 100644
index 0000000..0f8d38b
--- /dev/null
+++ b/fzf.spec
@@ -0,0 +1,52 @@
+%define debug_package %{nil}
+
+Name: fzf
+Version: 0.53.0
+Release: 1%{?dist}
+Summary: fzf is a general-purpose command-line fuzzy finder.
+License: MIT
+URL: https://github.com/junegunn/fzf
+Source0: https://github.com/junegunn/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+
+BuildRequires: golang >= 1.20
+
+%description
+fzf is a general-purpose command-line fuzzy finder.
+
+It's an interactive filter program for any kind of list; files, command history,
+processes, hostnames, bookmarks, git commits, etc. It implements a "fuzzy"
+matching algorithm, so you can quickly type in patterns with omitted characters
+and still get the results you want.
+
+%prep
+%autosetup -n %{name}-%{version} -p1
+
+%build
+go build -a -ldflags "-s -w -X main.version=%{version} -X main.revision=openEuler"
+
+%install
+install -Dm755 fzf %{buildroot}%{_bindir}/fzf
+install -Dm644 man/man1/fzf.1 %{buildroot}%{_mandir}/man1/fzf.1
+
+# tmux
+install -Dm644 man/man1/fzf-tmux.1 %{buildroot}%{_mandir}/man1/fzf-tmux.1
+install -Dm755 bin/fzf-tmux %{buildroot}%{_bindir}/fzf-tmux
+
+# shell completions
+install -Dm0644 shell/completion.bash \
+ %{buildroot}%{_datadir}/bash-completion/completions/fzf
+install -Dm0644 shell/key-bindings.bash \
+ %{buildroot}%{_datadir}/bash-completion/completions/fzf-key-bindings
+
+%files
+%{_bindir}/fzf
+%{_mandir}/man1/fzf.1.gz
+
+%license LICENSE
+%{_bindir}/fzf-tmux
+%{_mandir}/man1/fzf-tmux.1.gz
+
+%{_datadir}/bash-completion/completions/fzf
+%{_datadir}/bash-completion/completions/fzf-key-bindings
+
+%changelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..c23fc30
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+de0b46a4c1ae72f9ef2e0212ed671159 fzf-0.53.0.tar.gz