app-editors/cursor: add 0.45.8, drop 0.45.7
[gentoo-zh.git] / media-sound / spotube-bin / spotube-bin-3.9.0.ebuild
blobf74a95b1ceb9b714c06f2b002c0a3d5b8d7d8bde
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit desktop xdg
7 DESCRIPTION="A lightweight Spotify client using YouTube as audio source"
8 HOMEPAGE="https://github.com/KRTirtho/spotube"
9 SRC_URI="https://github.com/KRTirtho/spotube/releases/download/v${PV}/spotube-linux-${PV}-x86_64.tar.xz"
11 S="${WORKDIR}"
13 LICENSE="GPL-3"
14 SLOT="0"
15 KEYWORDS="~amd64"
17 BDEPEND="
18                 dev-util/patchelf
20 RDEPEND="
21                 >=media-video/mpv-0.38.0-r1
22                 >=dev-libs/libayatana-appindicator-0.5.92
25 src_install() {
26         insinto /opt/spotube/
27         doins -r data lib
28         exeinto /opt/spotube
29         doexe spotube
30         dosym -r /opt/spotube/spotube /usr/bin/spotube
31         doins "${S}/spotube-logo.png"
32         sed -i -e 's|^Exec=.*|Exec=/opt/spotube/spotube|' \
33                 -i -e 's|^Icon=.*|Icon=/opt/spotube/spotube-logo.png|' \
34                 "${S}"/spotube.desktop || die
35         for i in 16 32 64 128 256; do
36             doicon -s "$i" "${S}"/spotube-logo.png
37         done
38         domenu "${S}/spotube.desktop"
39         patchelf --replace-needed "libappindicator3.so.1" "libayatana-appindicator3.so.1" \
40         "${ED}/opt/spotube/lib/libtray_manager_plugin.so" || die