rust-just/rust-just.spec
2022-11-02 22:49:43 -07:00

121 lines
3.1 KiB
RPMSpec

# Generated by rust2rpm 22
%bcond_without check
%global crate just
Name: rust-just
Version: 1.8.0
Release: %autorelease
Summary: Just a command runner
License: CC0-1.0
URL: https://crates.io/crates/just
Source: %{crates_source}
# Initial patched metadata
# - Exclude unwanted files
# - Drop cradle dependency, the crate cannot be packaged due to CC0 license
Patch0: just-fix-metadata.diff
# Remove all uses of cradle
Patch1: just-1.5.0-no-cradle.patch
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging >= 21
%global _description %{expand:
just is a handy way to save and run project-specific commands.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%doc CHANGELOG.md
%doc CONTRIBUTING.md
%doc GRAMMAR.md
%doc README.md
%doc README.中文.md
%doc crates-io-readme.md
%doc examples
%{_bindir}/just
%{_mandir}/man1/just.1*
%{_datadir}/bash-completion
%{_datadir}/fish/
%{_datadir}/zsh/site-functions
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/CONTRIBUTING.md
%doc %{crate_instdir}/GRAMMAR.md
%doc %{crate_instdir}/README.md
%doc %{crate_instdir}/README.中文.md
%doc %{crate_instdir}/crates-io-readme.md
%{crate_instdir}/
%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 the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+help4help2man-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+help4help2man-devel %{_description}
This package contains library source intended for building other packages which
use the "help4help2man" feature of the "%{crate}" crate.
%files -n %{name}+help4help2man-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
install -dp %{buildroot}%{_mandir}/man1
install -p -m 644 man/just.1 %{buildroot}%{_mandir}/man1
install -dp %{buildroot}%{_datadir}/bash-completion/completions/
install -p -m 644 completions/just.bash %{buildroot}%{_datadir}/bash-completion/completions/just
install -dp %{buildroot}%{_datadir}/fish/vendor_completions.d
install -p -m 644 completions/just.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/just.fish
install -dp %{buildroot}%{_datadir}/zsh/site-functions
install -p -m 644 completions/just.zsh %{buildroot}%{_datadir}/zsh/site-functions/_just
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog