Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 831029
Collapse All | Expand All

(-)a/media-sound/spotify/files/spotify-wrapper (+23 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
export LD_LIBRARY_PATH="/usr/$LIBDIR/apulse"
4
5
if command -v spotify-dbus.py > /dev/null; then
6
	echo "Launching spotify with Gnome systray integration."
7
	spotify-dbus.py "$@"
8
elif command -v spotify-tray > /dev/null; then
9
	echo "Launching spotify with generic systray integration."
10
	minimized=
11
	for arg; do
12
		if [ "$arg" = --minimized ]; then
13
			minimized=$arg
14
			break
15
		fi
16
	done
17
	spotify-tray \
18
		--client-path="$SPOTIFY_HOME/spotify" --toggle $minimized -- "$@"
19
else
20
	echo "Neither gnome-integration-spotify nor spotify-tray are installed."
21
	echo "Launching spotify without systray integration."
22
	exec "$SPOTIFY_HOME/spotify" "$@"
23
fi
(-)a/media-sound/spotify/spotify-1.1.72-r2.ebuild (-1 / +116 lines)
Line 0 Link Here
0
- 
1
# Copyright 1999-2022 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
3
4
EAPI=8
5
6
inherit desktop optfeature pax-utils unpacker xdg
7
8
DESCRIPTION="Spotify is a social music platform"
9
HOMEPAGE="https://www.spotify.com/download/linux/"
10
SRC_BASE="http://repository.spotify.com/pool/non-free/s/${PN}-client/"
11
BUILD_ID_AMD64="439.gc253025e"
12
SRC_URI="${SRC_BASE}${PN}-client_${PV}.${BUILD_ID_AMD64}_amd64.deb"
13
14
LICENSE="Spotify"
15
SLOT="0"
16
KEYWORDS="~amd64"
17
IUSE="libnotify local-playback pax-kernel pulseaudio"
18
RESTRICT="mirror strip"
19
20
BDEPEND="
21
	>=dev-util/patchelf-0.10
22
	sys-devel/gettext
23
"
24
RDEPEND="
25
	dev-libs/nss
26
	dev-python/dbus-python
27
	libnotify? ( x11-libs/libnotify )
28
	dev-libs/openssl:0=
29
	media-libs/alsa-lib
30
	media-libs/fontconfig
31
	media-libs/harfbuzz
32
	media-libs/mesa[X(+)]
33
	net-misc/curl[ssl]
34
	net-print/cups[ssl]
35
	pulseaudio? ( media-sound/pulseaudio )
36
	!pulseaudio? ( media-sound/apulse )
37
	local-playback? ( media-video/ffmpeg:0/56.58.58 )
38
	x11-libs/gtk+:3
39
	app-accessibility/at-spi2-atk
40
	x11-libs/libxkbcommon
41
	x11-libs/libXScrnSaver
42
	x11-libs/libXtst
43
	x11-libs/libSM
44
	x11-libs/libICE
45
"
46
	#sys-libs/glibc
47
48
S="${WORKDIR}/"
49
50
QA_PREBUILT="
51
	opt/spotify/spotify-client/spotify
52
	opt/spotify/spotify-client/libEGL.so
53
	opt/spotify/spotify-client/libGLESv2.so
54
	opt/spotify/spotify-client/libcef.so
55
	opt/spotify/spotify-client/libvk_swiftshader.so
56
	opt/spotify/spotify-client/libvulkan.so.1
57
	opt/spotify/spotify-client/swiftshader/libEGL.so
58
	opt/spotify/spotify-client/swiftshader/libGLESv2.so
59
"
60
61
src_prepare() {
62
	default
63
	# Spotify links against libcurl-gnutls.so.4, which does not exist in Gentoo.
64
	patchelf --replace-needed libcurl-gnutls.so.4 libcurl.so.4 usr/bin/spotify \
65
		|| die "failed to patch libcurl library dependency"
66
}
67
68
src_install() {
69
	gunzip usr/share/doc/spotify-client/changelog.gz || die
70
	dodoc usr/share/doc/spotify-client/changelog
71
72
	SPOTIFY_PKG_HOME=usr/share/spotify
73
	insinto /usr/share/pixmaps
74
	doins ${SPOTIFY_PKG_HOME}/icons/*.png
75
76
	# install in /opt/spotify
77
	SPOTIFY_HOME=/opt/spotify/spotify-client
78
	insinto ${SPOTIFY_HOME}
79
	doins -r ${SPOTIFY_PKG_HOME}/*
80
	fperms +x ${SPOTIFY_HOME}/spotify
81
82
	dodir /usr/bin
83
	SPOTIFY_HOME=${SPOTIFY_HOME} LIBDIR=$(get_libdir) \
84
		envsubst '$SPOTIFY_HOME $LIBDIR' \
85
		< "${FILESDIR}/spotify-wrapper" > "${D}/usr/bin/spotify" || die
86
	fperms +x /usr/bin/spotify
87
88
	local size
89
	for size in 16 22 24 32 48 64 128 256 512; do
90
		newicon -s ${size} "${S}${SPOTIFY_PKG_HOME}/icons/spotify-linux-${size}.png" \
91
			"spotify-client.png"
92
	done
93
	domenu "${S}${SPOTIFY_PKG_HOME}/spotify.desktop"
94
	if use pax-kernel; then
95
		#create the headers, reset them to default, then paxmark -m them
96
		pax-mark C "${ED}${SPOTIFY_HOME}/${PN}" || die
97
		pax-mark z "${ED}${SPOTIFY_HOME}/${PN}" || die
98
		pax-mark m "${ED}${SPOTIFY_HOME}/${PN}" || die
99
		eqawarn "You have set USE=pax-kernel meaning that you intend to run"
100
		eqawarn "${PN} under a PaX enabled kernel.	To do so, we must modify"
101
		eqawarn "the ${PN} binary itself and this *may* lead to breakage!  If"
102
		eqawarn "you suspect that ${PN} is being broken by this modification,"
103
		eqawarn "please open a bug."
104
	fi
105
}
106
107
pkg_postinst() {
108
	xdg_pkg_postinst
109
110
	ewarn "If Spotify crashes after an upgrade its cache may be corrupt."
111
	ewarn "To remove the cache:"
112
	ewarn "rm -rf ~/.cache/spotify"
113
114
	optfeature "Gnome specific systray integration" gnome-extra/gnome-integration-spotify
115
	optfeature "systray integration on non-Gnome DEs" media-sound/spotify-tray
116
}

Return to bug 831029