File wallust.spec of Package wallust
Name: wallust
Version: 3.5.0
Release: 0
Summary: Generate a 16 color scheme based on an image
License: MIT
URL: https://explosion-mental.codeberg.page/wallust
Source0: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
Source100: wallust-rpmlintrc
Patch0: wallust-no-git.patch
BuildRequires: cargo
BuildRequires: rust
BuildRequires: pkgconfig
BuildRequires: libgit2-devel
BuildRequires: bash-completion
BuildRequires: fish
BuildRequires: zsh
%description
Wallust generates a 16 color scheme based on an image.
%prep
%autosetup -p1 -n %{name}-%{version}
tar -xzf %{SOURCE1}
mkdir -p .cargo
cat > .cargo/config.toml <<'EOF_CARGO'
[net]
offline = true
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF_CARGO
%build
export CARGO_HOME=%{_builddir}/cargo-home
cargo build --release --frozen
%install
install -Dm0755 target/release/wallust %{buildroot}%{_bindir}/wallust
install -Dm0644 man/wallust.1 %{buildroot}%{_mandir}/man1/wallust.1
install -Dm0644 man/wallust-cs.1 %{buildroot}%{_mandir}/man1/wallust-cs.1
install -Dm0644 man/wallust-run.1 %{buildroot}%{_mandir}/man1/wallust-run.1
install -Dm0644 man/wallust-theme.1 %{buildroot}%{_mandir}/man1/wallust-theme.1
install -Dm0644 man/wallust.5 %{buildroot}%{_mandir}/man5/wallust.5
install -Dm0644 completions/wallust.bash %{buildroot}%{_datadir}/bash-completion/completions/wallust
install -Dm0644 completions/_wallust %{buildroot}%{_datadir}/zsh/site-functions/_wallust
install -Dm0644 completions/wallust.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/wallust.fish
%files
%license LICENSE
%doc README.md docs schema.json wallust.toml
%{_bindir}/wallust
%{_mandir}/man1/wallust.1*
%{_mandir}/man1/wallust-cs.1*
%{_mandir}/man1/wallust-run.1*
%{_mandir}/man1/wallust-theme.1*
%{_mandir}/man5/wallust.5*
%{_datadir}/bash-completion/completions/wallust
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/wallust.fish
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_wallust
%changelog