rust-sd/rust-sd.spec
2021-11-14 19:31:10 +01:00

85 lines
1.8 KiB
RPMSpec

# Generated by rust2rpm 13
%bcond_without check
%global __cargo_skip_build 0
%global crate sd
Name: rust-%{crate}
Version: 0.7.6
Release: %autorelease
Summary: Intuitive find & replace CLI
# Upstream license specification: MIT
License: MIT
URL: https://crates.io/crates/sd
Source: %{crates_source}
# Initial patched metadata
# * Bump assert_cmd to 2.0.0
Patch0: sd-fix-metadata.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
%global _description %{expand:
Intuitive find & replace CLI.
* Painless regular expressions
sd uses regex syntax that you already know from JavaScript and Python.
Forget about dealing with quirks of sed or awk - get productive immediately.
* String-literal mode
Non-regex find & replace. No more backslashes or remembering which characters
are special and need to be escaped.
* Easy to read, easy to write
Find & replace expressions are split up, which makes them easy to read
and write. No more messing with unclosed and escaped slashes.
* Smart, common-sense defaults
Defaults follow common sense and are tailored for typical daily use.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
# Install all deps (without check), grab their licenses and make it simple
# * ASL 2.0 or MIT
# * MIT
# * MIT or ASL 2.0
# * (MIT or ASL 2.0) and BSD
# * Unlicense or MIT
License: MIT and BSD
%description -n %{crate} %{_description}
%files -n %{crate}
%doc CHANGELOG.md README.md
%license LICENSE
%{_bindir}/sd
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog