2018-04-12 13:49:15 +02:00
|
|
|
#
|
|
|
|
# spec file for package fzf
|
|
|
|
#
|
2024-01-01 07:57:54 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-04-12 13:49:15 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-04-19 03:56:36 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-04-12 13:49:15 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-05-26 20:43:01 +02:00
|
|
|
%global _lto_cflags %{nil}
|
2018-04-12 13:49:15 +02:00
|
|
|
Name: fzf
|
2024-04-14 19:30:19 +02:00
|
|
|
Version: 0.50.0
|
2018-04-12 13:49:15 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: A command-line fuzzy finder
|
|
|
|
License: MIT
|
|
|
|
Group: Productivity/File utilities
|
|
|
|
URL: https://github.com/junegunn/fzf
|
2022-06-21 22:45:03 +02:00
|
|
|
Source0: https://github.com/junegunn/fzf/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2022-12-18 22:27:52 +01:00
|
|
|
Source1: vendor.tar.zst
|
|
|
|
BuildRequires: zstd
|
2023-05-26 20:43:01 +02:00
|
|
|
BuildRequires: golang(API) >= 1.19
|
2018-04-12 13:49:15 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
fzf is an interactive Unix filter for command-line that can be used with any list; files,
|
|
|
|
command history, processes, hostnames, bookmarks, git commits, etc.
|
|
|
|
|
|
|
|
%package tmux
|
|
|
|
Summary: Tmux integration for fzf
|
2019-04-19 03:56:36 +02:00
|
|
|
Group: Productivity/File utilities
|
2022-06-21 22:45:03 +02:00
|
|
|
Supplements: (fzf and tmux)
|
2018-04-12 13:49:15 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description tmux
|
|
|
|
Tmux integration for fzf. Includes a wrapper script, fzf-tmux, that opens your list in a
|
|
|
|
separate tmux pane.
|
|
|
|
|
2024-04-24 12:26:11 +02:00
|
|
|
%package bash-integration
|
2024-03-14 17:24:10 +01:00
|
|
|
Summary: Bash completion for fzf
|
|
|
|
Group: Productivity/File utilities
|
|
|
|
Requires: bash-completion
|
|
|
|
Requires: fzf
|
2024-04-24 14:01:19 +02:00
|
|
|
Enhances: (fzf and bash-completion)
|
2024-04-24 12:26:11 +02:00
|
|
|
Provides: fzf-bash-completion = %{version}-%{release}
|
|
|
|
Obsoletes: fzf-bash-completion < %{version}-%{release}
|
2024-03-14 17:24:10 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
|
2024-04-24 12:26:11 +02:00
|
|
|
%description bash-integration
|
2024-03-14 17:24:10 +01:00
|
|
|
Bash shell completions for fzf
|
|
|
|
|
2024-04-24 12:26:11 +02:00
|
|
|
%package fish-integration
|
2024-03-14 17:24:10 +01:00
|
|
|
Summary: Fish completion for fzf
|
|
|
|
Group: Productivity/File utilities
|
|
|
|
Requires: fish
|
|
|
|
Requires: fzf
|
2024-04-24 14:01:19 +02:00
|
|
|
Enhances: (fzf and fish)
|
2024-04-24 12:26:11 +02:00
|
|
|
Provides: fzf-fish-completion = %{version}-%{release}
|
|
|
|
Obsoletes: fzf-fish-completion < %{version}-%{release}
|
2024-03-14 17:24:10 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
|
2024-04-24 12:26:11 +02:00
|
|
|
%description fish-integration
|
2024-03-14 17:24:10 +01:00
|
|
|
fish shell completions for fzf
|
|
|
|
|
|
|
|
To enable it, ensure you have a file ~/.config/fish/functions/fish_user_key_bindings.fish
|
|
|
|
which contains:
|
|
|
|
function fish_user_key_bindings
|
|
|
|
fzf_key_bindings
|
|
|
|
end
|
|
|
|
|
|
|
|
(or append fzf_key_bindings to the fish_user_key_bindings function if the file already exists)
|
|
|
|
|
2024-04-24 12:26:11 +02:00
|
|
|
%package zsh-integration
|
2024-03-14 17:24:10 +01:00
|
|
|
Summary: ZSH completion for fzf
|
|
|
|
Group: Productivity/File utilities
|
|
|
|
Requires: fzf
|
|
|
|
Requires: zsh
|
2024-04-24 14:01:19 +02:00
|
|
|
Enhances: (fzf and zsh)
|
2024-04-24 12:26:11 +02:00
|
|
|
Provides: fzf-zsh-completion = %{version}-%{release}
|
|
|
|
Obsoletes: fzf-zsh-completion < %{version}-%{release}
|
2024-03-14 17:24:10 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
|
2024-04-24 12:26:11 +02:00
|
|
|
%description zsh-integration
|
2024-03-14 17:24:10 +01:00
|
|
|
zsh shell completions for fzf
|
|
|
|
|
2018-12-21 18:48:41 +01:00
|
|
|
%define vimplugin_dir %{_datadir}/vim/site
|
|
|
|
|
|
|
|
%package -n vim-fzf
|
|
|
|
Summary: Vim plugin for fzf
|
2019-04-19 03:56:36 +02:00
|
|
|
Group: Productivity/File utilities
|
- Text attributes set in --color are not reset when fzf sees another
--color option for the same element. This allows you to put custom
text attributes in your $FZF_DEFAULT_OPTS and still have those
attributes even when you override the colors.
# Default colors and attributes
fzf
# Apply custom text attributes
export FZF_DEFAULT_OPTS='--color fg+:italic,hl:-1:underline,hl+:-1:reverse:underline'
fzf
# Different colors but you still have the attributes
fzf --color hl:176,hl+:177
# Write "regular" if you want to clear the attributes
fzf --color hl:176:regular,hl+:177:regular
- Renamed --phony to --disabled
- You can dynamically enable and disable the search functionality using
the new enable-search, disable-search, and toggle-search actions
- You can assign a different color to the query string for when search
is disabled
fzf --color query:#ffffff,disabled:#999999 --bind space:toggle-search
- Added last action to move the cursor to the last match
The opposite action top is renamed to first, but top is still
recognized as a synonym for backward compatibility
- Added preview-top and preview-bottom actions
- Extended support for alt key chords: alt with any case-sensitive
single character
fzf --bind alt-,:first,alt-.:last
- Generate tags for vim documentation
OBS-URL: https://build.opensuse.org/package/show/utilities/fzf?expand=0&rev=31
2021-01-03 08:32:21 +01:00
|
|
|
Requires: (vim or neovim)
|
2024-04-24 14:01:19 +02:00
|
|
|
Enhances: (fzf and zsh)
|
2022-06-21 22:45:03 +02:00
|
|
|
BuildArch: noarch
|
2018-12-21 18:48:41 +01:00
|
|
|
|
|
|
|
%description -n vim-fzf
|
|
|
|
Plugin for vim allowing use of fzf.
|
|
|
|
|
2018-04-12 13:49:15 +02:00
|
|
|
%prep
|
2021-05-22 10:37:07 +02:00
|
|
|
%autosetup -p1 -a1
|
|
|
|
|
2018-04-12 13:49:15 +02:00
|
|
|
# fix E: env-script-interpreter
|
|
|
|
sed -i 's,#!%{_bindir}/env ,#!/bin/,' ./bin/fzf-tmux
|
|
|
|
|
|
|
|
%build
|
2021-10-15 18:43:10 +02:00
|
|
|
export FZF_VERSION=%{version} FZF_REVISION=tarball
|
2019-04-19 03:56:36 +02:00
|
|
|
export GOCACHE=$(readlink -f vendor/)
|
|
|
|
%ifarch ppc64
|
|
|
|
BUILDMOD=""
|
|
|
|
%else
|
|
|
|
BUILDMOD="-buildmode=pie"
|
|
|
|
%endif
|
|
|
|
export RPM_OPT_FLAGS="%{optflags}"
|
2022-09-11 13:20:08 +02:00
|
|
|
go build -v -x -mod=vendor $BUILDMOD -a -ldflags "-s -X main.revision=%{version}"
|
2018-04-12 13:49:15 +02:00
|
|
|
|
|
|
|
%install
|
2019-04-19 03:56:36 +02:00
|
|
|
install -Dm755 fzf %{buildroot}%{_bindir}/fzf
|
2018-04-12 13:49:15 +02:00
|
|
|
install -Dm755 bin/fzf-tmux %{buildroot}%{_bindir}/fzf-tmux
|
|
|
|
install -Dm644 man/man1/fzf.1 %{buildroot}%{_mandir}/man1/fzf.1
|
|
|
|
install -Dm644 man/man1/fzf-tmux.1 %{buildroot}%{_mandir}/man1/fzf-tmux.1
|
|
|
|
|
2024-03-14 17:24:10 +01:00
|
|
|
# shell completions
|
2024-04-24 12:26:11 +02:00
|
|
|
# Since 0.48 fzf can generate shell integration scripts, but the
|
|
|
|
# upstream still promotes "for finer control" availability of the
|
|
|
|
# real scripts
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/fzf
|
|
|
|
cp -p -r shell/ %{buildroot}%{_datadir}/fzf
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
|
2024-04-24 15:59:40 +02:00
|
|
|
echo 'if [ "${BASH_VERSION-}" ] && [[ $- == *i* ]]; then eval "$(fzf --bash 2>/dev/null)"; fi' > \
|
2024-04-24 12:26:11 +02:00
|
|
|
%{buildroot}%{_sysconfdir}/profile.d/fzf-bash.sh
|
|
|
|
install -Dm0644 shell/completion.zsh \
|
2024-03-14 17:24:10 +01:00
|
|
|
%{buildroot}%{_sysconfdir}/zsh_completion.d/fzf-key-bindings
|
2024-04-24 12:26:11 +02:00
|
|
|
install -Dm0644 shell/key-bindings.zsh \
|
2024-03-14 18:00:08 +01:00
|
|
|
%{buildroot}%{_datadir}/zsh/site-functions/_fzf
|
2024-04-24 12:26:11 +02:00
|
|
|
install -Dm0644 shell/key-bindings.fish \
|
2024-03-14 17:24:10 +01:00
|
|
|
%{buildroot}%{_datadir}/fish/vendor_functions.d/fzf_key_bindings.fish
|
|
|
|
|
2018-12-21 18:48:41 +01:00
|
|
|
# vim plugin
|
|
|
|
install -D -m0644 -t %{buildroot}%{vimplugin_dir}/doc doc/*
|
|
|
|
install -D -m0644 -t %{buildroot}%{vimplugin_dir}/plugin plugin/*
|
2018-04-12 13:49:15 +02:00
|
|
|
|
2020-12-13 21:16:31 +01:00
|
|
|
%check
|
|
|
|
export SHELL=/bin/sh GOOS=
|
|
|
|
export GOCACHE=$(readlink -f vendor/)
|
|
|
|
%ifarch ppc64
|
|
|
|
BUILDMOD=""
|
|
|
|
%else
|
|
|
|
BUILDMOD="-buildmode=pie"
|
|
|
|
%endif
|
2023-02-17 17:58:21 +01:00
|
|
|
export CGO_CFLAGS="%{optflags}"
|
|
|
|
export CGO_CXXFLAGS="%{optflags}"
|
|
|
|
export CGO_CPPFLAGS="%{optflags}"
|
2020-12-13 21:16:31 +01:00
|
|
|
go test -v -x -mod=vendor ${BUILDMOD} -a \
|
|
|
|
-ldflags "-X main.revision=%{version}" \
|
|
|
|
github.com/junegunn/fzf/src \
|
|
|
|
github.com/junegunn/fzf/src/algo \
|
|
|
|
github.com/junegunn/fzf/src/tui \
|
|
|
|
github.com/junegunn/fzf/src/util
|
|
|
|
|
2018-04-12 13:49:15 +02:00
|
|
|
%files
|
2024-04-24 12:26:11 +02:00
|
|
|
%license LICENSE
|
2018-04-12 13:49:15 +02:00
|
|
|
%doc README.md
|
|
|
|
%{_bindir}/fzf
|
|
|
|
%{_mandir}/man1/fzf.1%{?ext_man}
|
2024-04-24 12:26:11 +02:00
|
|
|
%dir %{_datadir}/fzf
|
|
|
|
%{_datadir}/fzf/shell
|
2018-04-12 13:49:15 +02:00
|
|
|
|
|
|
|
%files tmux
|
|
|
|
%{_bindir}/fzf-tmux
|
|
|
|
%{_mandir}/man1/fzf-tmux.1%{?ext_man}
|
|
|
|
|
2024-04-24 12:26:11 +02:00
|
|
|
%files bash-integration
|
|
|
|
%config %{_sysconfdir}/profile.d/fzf-bash.sh
|
2024-03-14 17:24:10 +01:00
|
|
|
|
2024-04-24 12:26:11 +02:00
|
|
|
%files fish-integration
|
2024-03-14 17:24:10 +01:00
|
|
|
%dir %{_datadir}/fish
|
|
|
|
%dir %{_datadir}/fish/vendor_functions.d
|
|
|
|
%{_datadir}/fish/vendor_functions.d/fzf_key_bindings.fish
|
|
|
|
|
2024-04-24 12:26:11 +02:00
|
|
|
%files zsh-integration
|
2024-03-14 17:24:10 +01:00
|
|
|
%{_datadir}/zsh
|
|
|
|
%dir %{_sysconfdir}/zsh_completion.d
|
|
|
|
%config %{_sysconfdir}/zsh_completion.d/fzf-key-bindings
|
|
|
|
|
2018-12-21 18:48:41 +01:00
|
|
|
%files -n vim-fzf
|
|
|
|
%doc README-VIM.md
|
|
|
|
%dir %{_datadir}/vim
|
|
|
|
%dir %{vimplugin_dir}
|
|
|
|
%{vimplugin_dir}/doc
|
|
|
|
%{vimplugin_dir}/plugin
|
|
|
|
|
2018-04-12 13:49:15 +02:00
|
|
|
%changelog
|