diff --git a/app-misc/spicetify-cli/Manifest b/app-misc/spicetify-cli/Manifest index cfd2b1e..b35fd2e 100644 --- a/app-misc/spicetify-cli/Manifest +++ b/app-misc/spicetify-cli/Manifest @@ -2,3 +2,5 @@ DIST spicetify-cli-2.37.2-deps.tar.xz 5206740 BLAKE2B 3220ee76d74679c8e7ddbe49b2 DIST spicetify-cli-2.37.2.tar.gz 2020666 BLAKE2B e77530483cb89406ac7f76b97fcaca8a533329947d8ab6ac08d4765d6bdb681f1b4f77331e3445eda9615a70ba5cfaa04ccfecd3ae1feb73148474d71b182e96 SHA512 8289e3c26c8bbdc253d958d35c6d9c0e0a11469235e8c35b1257320c8a6b02953bcca525f3e358199daf664ccf0eac0de992f45fe85eba1a45188479b1483e4a DIST spicetify-cli-2.37.4-deps.tar.xz 5206636 BLAKE2B 7e05dcc2e76b52e468df4175dcdc4e1b8573f4df66333de6c87a2c9c237b836b64c8faf04c80fb4c6eb4f61e9b8286e949bfb33655f8a1fd69e7a02e10435f7c SHA512 a320ca4edab380c47316766e6b4256339540a7955fed0734f6e43169f21707c5b40e461ede95ea0a194298e3d93a6269ca055a69adabef9f22048a36fdfb2db1 DIST spicetify-cli-2.37.4.tar.gz 2021076 BLAKE2B 9f2b9e0a31bb0920513d5c2dac74a2bc67ada6f7b6ee7568d55650ff50ac655b0402736e1c7a1994647c7333b86f6c36927571f9f2767f49a29abb497e2f6d53 SHA512 14b510d8be8bbdc22ae424c2ea569eadbf08b6b3e0b1d4fa3fe5c7f6843f1052820f31623605bb858d3bcd51ed274070c679459d3c47f5f681e57a649b76169f +DIST spicetify-cli-2.37.7-deps.tar.xz 5206992 BLAKE2B 2e64c0cc43dccd1816258e21f2043fc7d7b2ed10c98d6242e32a96433f7ffeae798696a9e4dfb6208728ca95c613ce281a7e7b9e94789afa341f297aaa9ab9f5 SHA512 587a118c0c6412a83f8fde3f5f295ecafc8005d1216bc42844020870aebdba91475ba0e70a1aa2d5cd7e41d28e4f3bf9f782b0e14b4009e6a85ccf9ab1fb2cd6 +DIST spicetify-cli-2.37.7.tar.gz 2021758 BLAKE2B a51a70fc8d2775fca99768eb11f332c64c885063837abee4156f2fa5e02c63c36fec9f5c8c452b2496bfd038b9d2d2c6e33060fbdbb1a1582cd931aee00bffc9 SHA512 344a38c8d2e23917d9dd1827609399e0bd947477cff87eb4a56d90109f91b3d5a10ffc4b2d304b6e38ec43d88d87bc42f3b83c33eb16bdc5cb4bf7ecb1e43c67 diff --git a/app-misc/spicetify-cli/spicetify-cli-2.37.7.ebuild b/app-misc/spicetify-cli/spicetify-cli-2.37.7.ebuild new file mode 100644 index 0000000..3c4b62c --- /dev/null +++ b/app-misc/spicetify-cli/spicetify-cli-2.37.7.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module + +MY_PN="cli" + +WHITELIST_VERSIONS=( + "<> 1.2.13 1.2.45" +) + +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-${version2} >=media-sound/spotify-${version1} )" + 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/cli/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://gitlab.com/api/v4/projects/37881342/packages/generic/${PN}/${PV}/${P}-deps.tar.xz +" +S="${WORKDIR}/${MY_PN}-${PV}" + +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,cli} + newbin - spicetify <<-EOF + #!/usr/bin/env sh + exec /opt/spicetify-cli/cli \$@ + EOF + fperms +x "${INSTALLDIR}/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 as root." + elog "# chmod a+wr /opt/spotify/spotify-client" + elog "# chmod a+wr /opt/spotify/spotify-client/Apps -R" + elog "" + elog "WARNING: Do not run spicetify as root please" + 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" + + if $(has_version -r ">=media-sound/spotify-1.2.25"); then + elog "" + elog "The New Releases custom app no longer works with Spotify 1.2.25 and higher. As an alternative," + elog "please use What's New which was created by Spotify and can be enabled via Experimental Features" + elog "if it isn't already enabled." + fi +}