rust-just/rust-just.spec

131 lines
3.5 KiB
RPMSpec
Raw Normal View History

# Generated by rust2rpm 22
%bcond_without check
%global crate just
Name: rust-just
2023-01-25 14:43:31 +00:00
Version: 1.13.0
2022-09-30 04:34:05 +00:00
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
2023-01-07 02:39:29 +00:00
# - Downgrade env_logger dependency to 0.9 (0.10 is blocked by fedora-rust/rust2rpm#186)
Patch0: just-fix-metadata.diff
# Remove all uses of cradle
Patch1: just-1.5.0-no-cradle.patch
2023-01-25 14:43:31 +00:00
BuildRequires: rust-packaging >= 23
%global _description %{expand:
just is a handy way to save and run project-specific commands.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
2023-01-07 02:39:29 +00:00
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# Apache-2.0
# Apache-2.0 OR BSL-1.0
# Apache-2.0 OR MIT
# CC0-1.0
# MIT
# MIT OR Apache-2.0
# Unlicense OR MIT
License: CC0-1.0 AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND MIT AND Unicode-DFS-2016 AND (Unlicense OR MIT)
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
2023-01-07 02:39:29 +00:00
%license LICENSE.dependencies
%doc CHANGELOG.md
%doc CONTRIBUTING.md
%doc GRAMMAR.md
%doc README.md
%doc README.中文.md
%doc crates-io-readme.md
2022-10-20 03:43:59 +00:00
%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
2023-01-25 14:43:31 +00:00
%{cargo_license} >LICENSE.dependencies
%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
2022-09-30 04:34:05 +00:00
%autochangelog