rust-skim/rust-skim.spec

131 lines
3.1 KiB
RPMSpec
Raw Normal View History

# Generated by rust2rpm 10
%bcond_without check
%global crate skim
Name: rust-%{crate}
Version: 0.6.8
Release: 1%{?dist}
Summary: Fuzzy Finder in Rust
# Upstream license specification: MIT
License: MIT
URL: https://crates.io/crates/skim
Source: %{crates_source}
2019-06-05 01:00:03 +00:00
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand:
Fuzzy Finder in rust!.}
%description %{_description}
%if ! %{__cargo_skip_build}
%package -n %{crate}
Summary: %{summary}
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%doc CHANGELOG.md README.md
%{_bindir}/sk
%{_bindir}/sk-tmux
%{_mandir}/man1/sk.1.*
%{_mandir}/man1/sk-tmux.1.*
%{_datadir}/skim/
%{_datadir}/vim/vimfiles/plugin/skim.vim
%{_datadir}/nvim/site/plugin/skim.vim
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/sk
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_sk
%endif
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%license LICENSE
%doc CHANGELOG.md README.md
%{cargo_registry}/%{crate}-%{version}/
%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 "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
# Cleanup interpreters
sed -i -e '/^#!\//, 1d' shell/completion.*
sed -i -e '1d;2i#!/bin/bash' bin/sk-tmux
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
install -Dpm0755 -t %{buildroot}%{_bindir} \
bin/sk-tmux
install -Dpm0644 -t %{buildroot}%{_mandir}/man1 \
man/man1/*
install -d %{buildroot}%{_datadir}/skim
# Install vim plugin
install -Dpm0644 -t %{buildroot}%{_datadir}/vim/vimfiles/plugin \
plugin/skim.vim
install -Dpm0644 -t %{buildroot}%{_datadir}/nvim/site/plugin \
plugin/skim.vim
# Install shell completion
install -Dpm0644 shell/completion.bash %{buildroot}%{_datadir}/bash-completion/completions/sk
install -Dpm0644 shell/completion.zsh %{buildroot}%{_datadir}/zsh/site-functions/_sk
# Install shell key bindings (not enabled)
install -Dpm0644 -t %{buildroot}%{_datadir}/skim/shell \
shell/key-bindings.*
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Mon Jun 24 21:43:07 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.8-1
- Update to 0.6.8
2019-06-05 01:00:03 +00:00
* Wed Jun 05 2019 Josh Stone <jistone@redhat.com> - 0.6.7-2
- Bump nix to 0.14
* Fri May 31 20:09:57 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.6.7-1
- Release 0.6.7
* Sun Apr 14 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.6.6-1
- Initial package