# Generated by rust2rpm 22
%bcond_without check
%global crate ffsend
Name: rust-ffsend
Version: 0.2.76
Release: %autorelease
Summary: Easily and securely share files from the command line
License: GPL-3.0
URL: https://crates.io/crates/ffsend
Source0: %{crates_source}
Source1: LICENSE.dependencies
# Automatically generated patch to strip foreign dependencies
Patch: ffsend-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * use OpenSSL for crypto by default
# * drop ring dependency and features (not available on all architectures)
Patch: ffsend-fix-metadata.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging >= 21
%global _description %{expand:
Easily and securely share files from the command line. A fully featured Send
client.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
# * (ASL 2.0 or MIT) and BSD
# * 0BSD or MIT or ASL 2.0
# * ASL 2.0
# * ASL 2.0 or Boost
# * ASL 2.0 or MIT
# * BSD
# * GPLv3
# * MIT
# * MIT or ASL 2.0
# * MIT or ASL 2.0 or zlib
# * MIT or zlib or ASL 2.0
# * MPLv2.0
# * Unlicense or MIT
# * zlib or ASL 2.0 or MIT
License: GPLv3 and ASL 2.0 and BSD and MIT and MPLv2.0
# LICENSE.dependencies contains a full license breakdown
Recommends: xsel
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%license LICENSE.dependencies
%doc README.md
%{_bindir}/ffsend
%{_bindir}/ffput
%{_bindir}/ffget
%{_bindir}/ffdel
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/ffsend.bash
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/ffsend.fish
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_ffsend
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
cp %{SOURCE1} .
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
for t in ffput ffget ffdel; do
ln -s ffsend %{buildroot}%{_bindir}/$t
done
%{buildroot}%{_bindir}/ffsend generate completions bash fish zsh
install -Dpm0644 -t %{buildroot}%{_datadir}/bash-completion/completions \
ffsend.bash
install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_completions.d \
ffsend.fish
install -Dpm0644 -t %{buildroot}%{_datadir}/zsh/site-functions \
_ffsend
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog