Files
packages/anda/misc/pokeshell/pokeshell.spec
T
Raboneko 4779c9ddb3 Add: pokeget-rs and pokeshell (#3647) (#3719)
* Add pokeget-rs and pokeshell

* Checkout latest commit?

Signed-off-by: Gilver <rockgrub@disroot.org>

* Wonder if this actually works

Signed-off-by: Gilver <rockgrub@disroot.org>

* I genuinely have no idea what happened there

I HATE MOBILE

Signed-off-by: Gilver <rockgrub@disroot.org>

* Go back to checkout

Signed-off-by: Gilver <rockgrub@disroot.org>

* Provides(bundled)

Signed-off-by: Gilver <rockgrub@disroot.org>

* Did that wrong

Signed-off-by: Gilver <rockgrub@disroot.org>

* Try sourcing instead

Signed-off-by: Gilver <rockgrub@disroot.org>

* Try this convoluted mess

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update pokeget-rs.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Hate how confusing RPM is

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update pokeget-rs.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update pokeget-rs.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Hmm

Signed-off-by: Gilver <rockgrub@disroot.org>

* Hhhh

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update pokeget-rs.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Aaaaa

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update pokeget-rs.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Come on

Signed-off-by: Gilver <rockgrub@disroot.org>

* ?

Signed-off-by: Gilver <rockgrub@disroot.org>

* Why is RPM incomprehensible

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update pokeget-rs.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update pokeget-rs.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update pokeget-rs.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Enough

Signed-off-by: Gilver <rockgrub@disroot.org>

* Cleanup

Signed-off-by: Gilver <rockgrub@disroot.org>

* Fix directory tree

Signed-off-by: Gilver <rockgrub@disroot.org>

* Just fully flesh out macros

Signed-off-by: Gilver <rockgrub@disroot.org>

* Make macros consistent

Signed-off-by: Gilver <rockgrub@disroot.org>

* Tar stupid moment

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update pokeget-rs.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* I genuinely do not know what is going wrong at this point

Signed-off-by: Gilver <rockgrub@disroot.org>

* Remove git dep I guess

Signed-off-by: Gilver <rockgrub@disroot.org>

* Man

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update pokeget-rs.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Why is the pipe failing

Signed-off-by: Gilver <rockgrub@disroot.org>

* Maybe?

Signed-off-by: Gilver <rockgrub@disroot.org>

* Oops

Signed-off-by: Gilver <rockgrub@disroot.org>

* Just not sure where to put this

Signed-off-by: Gilver <rockgrub@disroot.org>

* Get rid of build log spam, track dep just in case

* Okay FINALLY done

---------

Signed-off-by: Gilver <rockgrub@disroot.org>
(cherry picked from commit 21afcbc6b8)

Co-authored-by: Gilver <rockgrub@disroot.org>
2025-03-03 04:18:44 -06:00

103 lines
3.2 KiB
RPMSpec

%global debug_package %{nil}
%global commit 6c9e2569843b08db14a964951f17a3943fd89fa2
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%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. <rockgrub@disroot.org>
%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
%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)
%description bash-completion
Pokéshell Bash completion.
%package zsh-completion
Summary: Zsh completion for Pokéshell
Requires: %{name}
Requires: zsh
Supplements: (%{name} and zsh)
%description zsh-completion
Basic Zsh completion support for Pokéshell.
%prep
%autosetup -n %{name}-%{commit}
cp %{SOURCE1} .
%build
%install
install -Dm755 bin/pokeshell %{buildroot}%{_bindir}/%{name}
install -Dm755 bin/imageshell/imageshell.sh -t %{buildroot}%{_datadir}/%{name}/imageshell
install -Dm644 share/pokemon_identifiers.json -t %{buildroot}%{_datadir}/%{name}
install -Dm644 scripts/*.py -t %{buildroot}%{_datadir}/%{name}/scripts
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
%files
%license LICENSE.md
%doc README.md
%{_bindir}/%{name}
%{_bindir}/imageshell
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/pokemon_identifiers.json
%dir %{_datadir}/%{name}/imageshell
%{_datadir}/%{name}/imageshell/imageshell.sh
%files helper-scripts
%doc scripts/README.md HELPER_ALIASES
%dir %{_datadir}/%{name}/scripts
%{_datadir}/%{name}/scripts/*
%{_bindir}/create-pokemon-identifiers
%{_bindir}/pokeget-timing
%files bash-completion
%{bash_completions_dir}/%{name}
%files zsh-completion
%{zsh_completions_dir}/_%{name}
%changelog
* Sat Mar 01 2025 Gilver E. <rockgrub@disroot.org>
- Initial package