Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37479491
en ru br
Репозитории ALT

Группа :: Development/Tools
Пакет: fzf

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%global __find_debuginfo_files %nil
%global _unpackaged_files_terminate_build 1

%set_verify_elf_method unresolved=no
%add_debuginfo_skiplist %_bindir
%brp_strip_none %_bindir/*

%define fzf_revision d471067

Name: fzf
Version: 0.42.0
Release: alt1
Summary: A general-purpose command-line fuzzy finder.

Group: Development/Tools
License: MIT
URL: https://github.com/junegunn/fzf

Packager: Vladimir Didenko <cow at altlinux.org>

Source0: %name-%version.tar

ExclusiveArch: %go_arches

BuildRequires(pre): rpm-build-golang
BuildRequires(pre): rpm-build-vim
BuildRequires: golang

Provides: bash-completion-%name = %version-%release
Obsoletes: bash-completion-%name < 0.28.0

Provides: zsh-completion-%name = %version-%release
Obsoletes: zsh-completion-%name < 0.28.0

%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: script for launching fzf in a tmux pane
Group: Development/Tools
BuildArch: noarch

%description tmux
Script for launching fzf in a tmux pane

%package -n vim-plugin-%name
Summary: Vim plugin for %name
Group: Editors
BuildArch: noarch
Requires: %_bindir/vim
Requires: %name = %EVR

%description -n vim-plugin-%name
Vim plugin for %name

%prep
%setup -q

%build
export FZF_VERSION=%version
export FZF_REVISION=%fzf_revision
go build -a -ldflags "-s -w -X main.version=${FZF_VERSION} -X main.revision=${FZF_REVISION}" -tags "" -o bin/%name

%install
mkdir -p %buildroot%_bindir

#install main binary

install -Dpm0755 bin/%name %{buildroot}%{_bindir}/

#install tmux support

install -Dpm0755 bin/%name-tmux %{buildroot}%{_bindir}/

#install man pages

install -d -p %{buildroot}%{_mandir}/man1
install -Dpm0644 man/man1/*.1 %{buildroot}%{_mandir}/man1/

install -d %{buildroot}%{_datadir}/%name/shell
install -Dpm0644 shell/key-bindings.* %{buildroot}%{_datadir}/%name/shell/

# Install shell completion

install -d %{buildroot}%{_datadir}/bash-completion/completions
install -Dpm0644 shell/completion.bash %{buildroot}%{_datadir}/bash-completion/completions/fzf
install -d %{buildroot}%{_datadir}/zsh/site-functions
install -Dpm0644 shell/completion.zsh %{buildroot}%{_datadir}/zsh/site-functions/fzf

# Install vim plugin

install -d %buildroot%vim_runtime_dir/plugin
install -Dpm0644 plugin/fzf.vim %buildroot%vim_runtime_dir/plugin/

%files
%_bindir/%name
%_mandir/man1/%name.1*
%dir %_datadir/%name
%_datadir/%name/shell
%_datadir/bash-completion/completions/*
%_datadir/zsh/site-functions/*

%files tmux
%_bindir/%name-tmux
%{_mandir}/man1/%name-tmux.1*

%files -n vim-plugin-%name
%vim_runtime_dir/plugin/*

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin