%global cargo_install_lib 0 Name: elan Version: 4.2.1 Release: %autorelease Summary: Manage multiple Lean installation with ease License: MIT OR Apache-2.0 URL: https://github.com/leanprover/elan Source: %{url}/archive/v%{version}/elan-%{version}.tar.gz # non-upstreamable patches: # * drop Windows-specific dependencies Patch: 0001-Drop-Windows-specific-dependencies.patch # * drop vendored features Patch: 0002-Drop-vendored-features.patch # * workaround for outdated dependency version Patch: 0003-Outdated-dependency-version-workaround.patch ExcludeArch: %{ix86} BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Manage multiple Lean installations with ease.} %description %{_description} %prep %autosetup -n elan-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires -t %build %cargo_build -f no-self-update %{cargo_license_summary -f no-self-update} %{cargo_license -f no-self-update} > LICENSE.dependencies %install %cargo_install -f no-self-update cp -pav target/rpm/elan-init target/rpm/elan target/rpm/elan completions bash > elan.bash target/rpm/elan completions fish > elan.fish target/rpm/elan completions zsh > _elan install -Dpm 0644 elan.bash -t %{buildroot}/%{bash_completions_dir} install -Dpm 0644 elan.fish -t %{buildroot}/%{fish_completions_dir} install -Dpm 0644 _elan -t %{buildroot}/%{zsh_completions_dir} %check %cargo_test %files %license LICENSE-APACHE %license LICENSE-MIT %license LICENSE.dependencies %doc CHANGELOG.md %doc README.md %{_bindir}/elan-init %{bash_completions_dir}/elan.bash %{fish_completions_dir}/elan.fish %{zsh_completions_dir}/_elan %changelog %autochangelog