%bcond_with check %global crate hyprdim Name: hyprdim Version: 3.0.1 Release: %autorelease Summary: Automatically dim windows in Hyprland when switching between them # LICENSE.dependencies contains a full license breakdown generated at build time License: GPL-3.0-or-later AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND MIT AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) URL: https://github.com/donovanglover/hyprdim Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source1: %{name}-%{version}-vendor.tar.xz BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Automatically dim windows in Hyprland when switching between them.} %description %{_description} %prep %autosetup -p1 tar -xJf %{SOURCE1} %cargo_prep -v vendor %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} %install install -Dpm0755 target/release/%{name} %{buildroot}%{_bindir}/%{name} install -Dpm0644 target/completions/_%{name} %{buildroot}%{zsh_completions_dir}/_%{name} install -Dpm0644 target/completions/%{name}.bash %{buildroot}%{bash_completions_dir}/%{name} install -Dpm0644 target/completions/%{name}.fish %{buildroot}%{fish_completions_dir}/%{name}.fish install -Dpm0644 target/man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %if %{with check} %check %cargo_test %endif %files %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md %{_bindir}/%{name} %{_mandir}/man1/%{name}.1.* %{bash_completions_dir}/%{name} %{fish_completions_dir}/%{name}.fish %{zsh_completions_dir}/_%{name} %changelog %autochangelog