# Generated by rust2rpm 27 %bcond check 1 %global crate eza Name: rust-eza Version: 0.23.4 Release: %autorelease Summary: Modern replacement for ls License: EUPL-1.2 URL: https://crates.io/crates/eza Source: %{crates_source} # Automatically generated patch to strip dependencies and normalize metadata Patch: eza-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * temporarily downgrade palette dependency from 0.7.6 to 0.7.5 # * drop feature for statically linking with OpenSSL # * drop unused, benchmark-only criterion dev-dependency # * drop features that are specific to NixOS packaging # * exclude files that are only useful for upstream developmen Patch: eza-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 BuildRequires: pandoc-cli BuildRequires: rust-git2-devel %global _description %{expand: A modern replacement for ls.} %description %{_description} %package -n %{crate} Summary: %{summary} # FIXME: paste output of %%cargo_license_summary here License: # FIXME # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE.txt %license LICENSES/CC-BY-4.0.txt %license LICENSE.dependencies %doc CHANGELOG.md %doc CODE_OF_CONDUCT.md %doc CONTRIBUTING.md %doc INSTALL.md %doc README.md %doc SECURITY.md %doc TESTING.md %{_bindir}/eza %{bash_completions_dir}/eza %{fish_completions_dir}/eza.fish %{zsh_completions_dir}/_eza %{_mandir}/man1/eza.1* %{_mandir}/man5/eza_colors.5* %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.txt %license %{crate_instdir}/LICENSES/CC-BY-4.0.txt %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/CODE_OF_CONDUCT.md %doc %{crate_instdir}/CONTRIBUTING.md %doc %{crate_instdir}/INSTALL.md %doc %{crate_instdir}/README.md %doc %{crate_instdir}/SECURITY.md %doc %{crate_instdir}/TESTING.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}+git-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+git-devel %{_description} This package contains library source intended for building other packages which use the "git" feature of the "%{crate}" crate. %files -n %{name}+git-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+git2-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+git2-devel %{_description} This package contains library source intended for building other packages which use the "git2" feature of the "%{crate}" crate. %files -n %{name}+git2-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires -n %build %cargo_build -n %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies # build mans for man in eza.1 eza_colors.5 ; do pandoc --standalone -f markdown -t man man/$man.md > man/$man done %install %cargo_install -n # install shell completions install -Dpm 0644 completions/bash/eza -t %{buildroot}/%{bash_completions_dir}/ install -Dpm 0644 completions/fish/eza.fish -t %{buildroot}/%{fish_completions_dir}/ install -Dpm 0644 completions/zsh/_eza -t %{buildroot}/%{zsh_completions_dir}/ # install mans install -Dpm 0644 man/eza.1 -t %{buildroot}/%{_mandir}/man1 install -Dpm 0644 man/eza_colors.5 -t %{buildroot}/%{_mandir}/man5 %if %{with check} %check %cargo_test %endif %changelog %autochangelog