diff --git a/app-misc/spicetify-cli/Manifest b/app-misc/spicetify-cli/Manifest index 083807e..7dbe923 100644 --- a/app-misc/spicetify-cli/Manifest +++ b/app-misc/spicetify-cli/Manifest @@ -2,3 +2,5 @@ DIST spicetify-cli-2.38.5-deps.tar.xz 5258904 BLAKE2B 0ec1aef9e41255c141a567d787 DIST spicetify-cli-2.38.5.tar.gz 2022514 BLAKE2B a34f15868e45b59530db631ff91e7a5ef281b9e15677dbe3d81a22dc6ef37f3d57ea2d6eb57ef371f7ceed310856b0d38bc182d1fca5cc541463bb04622318e1 SHA512 bcb411b2d0c6448d84557c18d64886dcc490618c35acb89e3a77b316acb43caf3dcb88c13e3d2fa03c5d0d3505492a9c62b2526d842faaadfb78ce95bf2936ca DIST spicetify-cli-2.38.6-deps.tar.xz 5260420 BLAKE2B 66aa118eef67862743b510c2859516701b4239b09935f8bac79d4fcb830b195c59b095a80779dd91e3654a76fa0acdf6dab69fe9f377c31a0043fe7f4861cb4b SHA512 b2c106a7a0e6a16b412eb241f109babf3b7553d6c98082a1a6dba8545dbc0b8db6803f76179f2c36f2cfb73610dba054e2878314fd2ad1d34669b21be0bcb4a3 DIST spicetify-cli-2.38.6.tar.gz 2023048 BLAKE2B 1f20b035b9fb246724a000782b53a65c43a2cef5f6b1fb1b77a8fa529c1f300b0d83acb32feb1e9027595e8789b3b228390fb153eaed1654dd7b1eebc9695c56 SHA512 08b410e87480b0636e38f09a063ff10546f79d6b393c01812acca5759fbc70fc1497124ea69e509494a85c40d312628459d41f736afe7362dc9c0882f6763e05 +DIST spicetify-cli-2.38.7-deps.tar.xz 5264688 BLAKE2B 3de6e467c829b3bb64fc43fde177b4a6384e2fbbc27d88ab58076ee68aba35482561bfdbb683d4062fa290e0a92042a90e53333cdbbcc9dd93b7a29cda5a6507 SHA512 afa80807f370e03f8739bf4a96eaab8fb10d7ef865794933def788c5dc78bfd4d7a8d5d942e90b73d02a7ccdcdad0da668582118eaadb666157eb3f4e1a12fa2 +DIST spicetify-cli-2.38.7.tar.gz 2023337 BLAKE2B 6b09237ee8ac93b9edfdfcb6547e9165f0f1d07d2d472c995394b972a24cf3bca55f813dfbf64ba4800c92a9f2383a5539cf8355240988ad3d169d6adb88ada8 SHA512 2535229bbd6f58b289c6af06fd484142a071383ce232a0ee23242e7721f85c448afc61e78a4cde8f39f47d29147418e5a7d866e159ed2835ddc1412b9ced4f58 diff --git a/app-misc/spicetify-cli/spicetify-cli-2.38.7.ebuild b/app-misc/spicetify-cli/spicetify-cli-2.38.7.ebuild new file mode 100644 index 0000000..de99307 --- /dev/null +++ b/app-misc/spicetify-cli/spicetify-cli-2.38.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.14 1.2.53" +) + +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 +}