app-misc/spicetify-cli: add 2.20.3

Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2023-06-28 20:24:40 +03:00
parent 68ad6164cf
commit 71a9823fc1
No known key found for this signature in database
GPG Key ID: A12750536B5E7010
2 changed files with 99 additions and 0 deletions

View File

@ -4,3 +4,5 @@ DIST spicetify-cli-2.20.1-deps.tar.xz 4836496 BLAKE2B 2ce9dfcaeff71393638d78c7fd
DIST spicetify-cli-2.20.1.tar.gz 2033994 BLAKE2B 5461b5ccb4a185dd08414eec4077f21c4b6f312faef092ec6adbf5d13772917d6f8e3b26e6a68cd4618605914c7bc9bae7d4060447d47d390a1128bf673a01d1 SHA512 4ff29aaba4ab4b63501c8323524579c88688c671c77b55be9025c9b17d2d92d711c9d543f62a78f0166c89891fdb58094fdb9566ea165dbd147176ed1648a38a
DIST spicetify-cli-2.20.2-deps.tar.xz 4836824 BLAKE2B 52b0ad55752e143d574b11ed5a3fb35820b52f794154002bebd021e1d25d7e00e08e1340c810a394914dea2a348d5725fcae583304b364ad909e9627fb2f05a7 SHA512 c7d610e61df03bd22899053c5791abcfca7763101473d9d4b3ac5de32fefa72e4d73bac4dedf02e2fcd2009db08ee88d959c6bdd378b7d1da33bebfb75e18b84
DIST spicetify-cli-2.20.2.tar.gz 2036866 BLAKE2B 0da08a501936dd8485df797184541c56f83774e50e7e1291b1339ecf01647df207df7c92b3380bb18a45cc02f41fc3cc570a728b13ee78b30f3dc6d8db12cd22 SHA512 d74c8dc6af55f5a6103baec05925c789f47c55617945da002e2676c90210d5df4e567113431fe9f4f2735947169e4b84074023509949cb2048e018a39e8cf146
DIST spicetify-cli-2.20.3-deps.tar.xz 4836072 BLAKE2B 19f5c340d786ad082a7fb25a53468873e96a1814245a5ab4b3ff4383cf353d0e5db95a9c3d68df4bc695373bf4ae30d312b39a24684e11f7481a6a00347da0a9 SHA512 9a66b4fd8fe4ef3889f686e8f8c9223314bd4ba79508962b8bde8739d8c1d816e429b22216b49868994bdeaa42cc559506d5d70490594ebaab3039b8c71184ab
DIST spicetify-cli-2.20.3.tar.gz 2036885 BLAKE2B 25683ef8158f9b3d91da2d9393110020fa3b6141a531c94fc206ea6b5cf98d9dc19b349663159e12aa1fa0cde34e59a5c42bb5166a6e8e020bf204f2aa23a119 SHA512 c8915d5bd005cbe7e30bb3a0f4b2cbd623a164ffed7d86acc615f18402eeb20def3821a135e8e0fcac662eb8eb5bd42fe8e4f5faa47f485c29d1c7ae82eadcaf

View File

@ -0,0 +1,97 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
#2023-06-27:
# added 1.2.13 despite it not being declared compatbile for Linux in particular.
# Works fine for me and is declared compatible for Windows and macOS.
WHITELIST_VERSIONS=(
"~ 1.2.13"
"~ 1.2.11"
"~ 1.2.9"
"~ 1.2.8"
"~ 1.1.99"
)
whitelist_versions() {
local version_spec version1 version2
local -a deps
SPOTIFY_VERSIONS=
# Iterate in reverse for elog
for ((index = $(( ${#WHITELIST_VERSIONS[@]} - 1 )); index >= 0; index--)); do
read -r version_spec version1 version2 <<< "${WHITELIST_VERSIONS[${index}]}"
case ${version_spec} in
"<>")
deps[$index]=">=media-sound/spotify-${version1} <=media-sound/spotify-${version2}"
SPOTIFY_VERSIONS+="${version1} -> ${version2}"
;;
"~")
deps[$index]="~media-sound/spotify-${version1}"
SPOTIFY_VERSIONS+="${version1}"
;;
*)
die "Invalid version specifier in WHITELIST_VERSIONS"
;;
esac
if [[ ${index} == 0 ]]; then
SPOTIFY_VERSIONS+=". "
elif [[ ${index} == 1 ]]; then
SPOTIFY_VERSIONS+=" and "
else
SPOTIFY_VERSIONS+=", "
fi
done
RDEPEND=" || ( ${deps[@]} )"
}
whitelist_versions
DESCRIPTION="Commandline tool to customize Spotify client."
HOMEPAGE="https://spicetify.app/"
SRC_URI="
https://github.com/spicetify/spicetify-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://gitlab.com/api/v4/projects/37881342/packages/generic/${PN}/${PV}/${P}-deps.tar.xz
"
LICENSE="Apache-2.0 BSD LGPL-2.1 MIT"
SLOT="0"
KEYWORDS="~amd64"
# no tests
RESTRICT="test"
INSTALLDIR="/opt/${PN}"
src_compile() {
ego build -ldflags "-X main.version=${PV}"
}
src_install() {
insinto "${INSTALLDIR}"
doins -r {CustomApps,Extensions,Themes,jsHelper,spicetify-cli}
dobin "${FILESDIR}/spicetify"
fperms +x "${INSTALLDIR}/spicetify-cli"
}
pkg_postinst() {
elog "Spicetify requires a Spotify install that it can modify."
elog "To give read and write permissions to everyone on the system to run the following commands."
elog "# chmod a+wr /opt/spotify/spotify-client"
elog "# chmod a+wr /opt/spotify/spotify-client/Apps -R"
elog ""
elog "Spicetify compatibility is limited to the following Spotify versions:"
elog " ${SPOTIFY_VERSIONS}"
elog ""
elog "Otherwise you can install spotify to a user modifiable location like as a flatpak:"
elog " https://spicetify.app/docs/advanced-usage/installation#spotify-installed-from-flatpak"
elog ""
elog "To install themes see:"
elog " https://spicetify.app/docs/advanced-usage/themes"
}