Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix (pokeshell): Fix install issues #3721

Merged
merged 5 commits into from
Mar 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 38 additions & 36 deletions anda/misc/pokeshell/pokeshell.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,63 @@
%global date 20241124
%global ver 1.0.0

Name: pokeshell
Version: %{ver}^%{date}git.%{shortcommit}
Release: 1%{?dist}
Summary: A shell program to show Pokémon sprites in the terminal.
License: GPL-3.0-or-later
URL: https://github.com/acxz/pokeshell
Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz
Source1: HELPER_ALIASES
Requires: jq
Requires: ImageMagick
Requires: python3
Requires: (timg or chafa)
BuildArch: noarch
Packager: Gilver E. <[email protected]>
Name: pokeshell
Version: %{ver}^%{date}git.%{shortcommit}
Release: 2%{?dist}
Summary: A shell program to show Pokémon sprites in the terminal.
License: GPL-3.0-or-later
URL: https://github.com/acxz/pokeshell
Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz
Source1: HELPER_ALIASES
BuildRequires: sed
Requires: bash
Requires: jq
Requires: ImageMagick
Requires: python3
Requires: (timg or chafa)
BuildArch: noarch
Packager: Gilver E. <[email protected]>

%description
A featureful shell program to show Pokémon sprites in the terminal.

%package helper-scripts
Summary: This package contains helper scripts for Pokéshell
Requires: %{name}
Requires: uv
Recommends: hyperfine
Recommends: pokeget-rs
Recommends: pokemon-colorscripts
%package helper-scripts
Summary: This package contains helper scripts for Pokéshell
Requires: bash
Requires: %{name}
Requires: uv
Recommends: hyperfine
Recommends: pokeget-rs
Recommends: pokemon-colorscripts

%description helper-scripts
Generates pokemon identifiers (such as localized names) using PokeAPI that the sprite backends do not support natively.

See included README for what these scripts can do.

%package bash-completion
Summary: Bash completion for Pokéshell
Requires: bash
Requires: %{name}
Supplements: (%{name} and bash)
%package bash-completion
Summary: Bash completion for Pokéshell
Requires: bash
Requires: %{name}
Supplements: (%{name} and bash)

%description bash-completion
%description bash-completion
Pokéshell Bash completion.

%package zsh-completion
Summary: Zsh completion for Pokéshell
Requires: %{name}
Requires: zsh
Supplements: (%{name} and zsh)
%package zsh-completion
Summary: Zsh completion for Pokéshell
Requires: %{name}
Requires: zsh
Supplements: (%{name} and zsh)

%description zsh-completion
%description zsh-completion
Basic Zsh completion support for Pokéshell.

%prep
%autosetup -n %{name}-%{commit}
cp %{SOURCE1} .
sed -i 's/MY_DIR=.*/MY_DIR=\/usr\/share\/%{name}/g' bin/pokeshell
sed -i 's/\.\.\/share\///' bin/pokeshell

%build

Expand All @@ -68,8 +73,6 @@ install -Dm644 scripts/*.sh -t %{buildroot}%{_datadir}/%{name}/scripts
# Bash and Zsh completion share a single file, Zsh completion is pretty rudimentary
install -Dm644 share/bash-completion/completions/pokeshell -t %{buildroot}%{bash_completions_dir}
install -Dm644 share/bash-completion/completions/pokeshell %{buildroot}%{zsh_completions_dir}/_%{name}
# Keep actual directories out of /usr/bin
ln -sf %{_datadir}/%{name}/imageshell %{buildroot}%{_bindir}/imageshell
# Make helper scripts directly executable
ln -sf %{_datadir}/%{name}/scripts/create_pokemon_identifiers.py %{buildroot}%{_bindir}/create-pokemon-identifiers
ln -sf %{_datadir}/%{name}/scripts/timing.sh %{buildroot}%{_bindir}/pokeget-timing
Expand All @@ -78,7 +81,6 @@ ln -sf %{_datadir}/%{name}/scripts/timing.sh %{buildroot}%{_bindir}/pokeget-timi
%license LICENSE.md
%doc README.md
%{_bindir}/%{name}
%{_bindir}/imageshell
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/pokemon_identifiers.json
%dir %{_datadir}/%{name}/imageshell
Expand Down