Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- deja
- pkgdepot-bin
- scip
- spotify-bin
- spotatui
runs-on: ubuntu-latest
container:
Expand Down
13 changes: 13 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@
"schedule": [
"monthly"
]
},
{
"description": "Spotify distributes through its own Debian repository",
"matchDatasources": [
"deb"
],
"matchPackageNames": [
"spotify-client"
],
"registryUrls": [
"https://repository.spotify.com?suite=testing&components=non-free&binaryArch=amd64"
],
"extractVersion": "^[0-9]+:(.+)$"
}
],
"customManagers": [
Expand Down
42 changes: 42 additions & 0 deletions spotify-bin/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
pkgbase = spotify-bin
pkgdesc = Spotify desktop client
pkgver = 1.2.96.518.g366879e1
pkgrel = 1
epoch = 1
url = https://www.spotify.com
arch = x86_64
license = LicenseRef-Spotify
depends = alsa-lib>=1.0.14
depends = gtk3
depends = libxss
depends = desktop-file-utils
depends = openssl
depends = nss
depends = at-spi2-atk
depends = libcurl-gnutls
depends = libsm
depends = libayatana-appindicator
optdepends = ffmpeg4.4: Adds support for playback of local files
optdepends = zenity: Adds support for importing local files
optdepends = libnotify: Desktop notifications
provides = spotify=1:1.2.96.518.g366879e1
conflicts = spotify
options = !debug
options = !strip
source = https://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.96.518.g366879e1_amd64.deb
source = spotify.sh
source = spotify.protocol
source = LICENSE
source = spotify-bin-1.2.96.518.g366879e1-1-Release::https://repository.spotify.com/dists/testing/Release
source = spotify-bin-1.2.96.518.g366879e1-1-Release.gpg::https://repository.spotify.com/dists/testing/Release.gpg
source = spotify-bin-1.2.96.518.g366879e1-1-Packages::https://repository.spotify.com/dists/testing/non-free/binary-amd64/Packages
validpgpkeys = E1096BCBFF6D418796DE78515384CE82BA52C83A
sha256sums = 1a86581f53c2b0e2c406150665ea05e245b9e6b286390ea61d5d193ba617eb2f
sha256sums = 764cf7d24c35e3327cef4c0469351dabbf8b1edbaa10e1f35f64c91f135b31d9
sha256sums = af54f3b90cac46fa100b3f919a9225d10d847617d24aa9af3d832e7689f482c3
sha256sums = 4e8bea31ca27e16cac9c9dcd8f6ec27e1f82b45de86d6fee7a1e77e23f884b92
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP

pkgname = spotify-bin
9 changes: 9 additions & 0 deletions spotify-bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/pkg/
/src/
/*.pkg.tar.*
/*.src.tar.*
/spotify-bin-*.deb
/spotify-client_*.deb
/spotify-bin-*-Release
/spotify-bin-*-Release.gpg
/spotify-bin-*-Packages
349 changes: 349 additions & 0 deletions spotify-bin/LICENSE

Large diffs are not rendered by default.

117 changes: 117 additions & 0 deletions spotify-bin/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Maintainer: Travis Lyons <pkgbuild at trly dot dev>
# Contributor: Christian Heusel <christian@heusel.eu>
# Contributor: Robin Candau <antiz@archlinux.org>
# Contributor: NicoHood <archlinux {cat} nicohood {dog} de>
# Contributor: TobFromme < TobFromme {hat} pm {dont} me >
# Contributor: Ashley Whetter <(firstname) @ awhetter.co.uk>
# Contributor: Eothred <yngve.levinsen@gmail.com>
#
# Adapted from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=spotify
pkgname=spotify-bin
pkgver=1.2.96.518.g366879e1 # renovate: datasource=deb depName=spotify-client
epoch=1
pkgrel=1
pkgdesc='Spotify desktop client'
arch=('x86_64')
url='https://www.spotify.com'
license=('LicenseRef-Spotify')
depends=(
'alsa-lib>=1.0.14'
'gtk3'
'libxss'
'desktop-file-utils'
'openssl'
'nss'
'at-spi2-atk'
'libcurl-gnutls'
'libsm'
'libayatana-appindicator'
)
optdepends=(
'ffmpeg4.4: Adds support for playback of local files'
'zenity: Adds support for importing local files'
'libnotify: Desktop notifications'
)
provides=("spotify=1:${pkgver}")
conflicts=('spotify')
options=('!debug' '!strip')
source=("https://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${pkgver}_amd64.deb"
"spotify.sh"
"spotify.protocol"
"LICENSE"
"${pkgname}-${pkgver}-${pkgrel}-Release::https://repository.spotify.com/dists/testing/Release"
"${pkgname}-${pkgver}-${pkgrel}-Release.gpg::https://repository.spotify.com/dists/testing/Release.gpg"
"${pkgname}-${pkgver}-${pkgrel}-Packages::https://repository.spotify.com/dists/testing/non-free/binary-amd64/Packages")
sha256sums=('1a86581f53c2b0e2c406150665ea05e245b9e6b286390ea61d5d193ba617eb2f'
'764cf7d24c35e3327cef4c0469351dabbf8b1edbaa10e1f35f64c91f135b31d9'
'af54f3b90cac46fa100b3f919a9225d10d847617d24aa9af3d832e7689f482c3'
'4e8bea31ca27e16cac9c9dcd8f6ec27e1f82b45de86d6fee7a1e77e23f884b92'
'SKIP'
'SKIP'
'SKIP')
# The Release, signature, and Packages files change with every upstream
# publication, so their checksums are SKIPped. updpkgsums and pkgctl rewrite
# literal checksum arrays, which would leave stale hashes behind; indexed
# assignments after the array survive those rewrites (pacman-contrib#119).
sha256sums[4]='SKIP'
sha256sums[5]='SKIP'
sha256sums[6]='SKIP'
validpgpkeys=('E1096BCBFF6D418796DE78515384CE82BA52C83A') # Spotify Public Repository Signing Key <tux@spotify.com>

verify() {
local release="${pkgname}-${pkgver}-${pkgrel}-Release"
local packages="${pkgname}-${pkgver}-${pkgrel}-Packages"
local key="keys/pgp/${validpgpkeys[0]}.asc"
local verifydir
verifydir="$(mktemp -d)"
install -dm700 "${verifydir}/gnupg"

local status
if gpg --batch --homedir "${verifydir}/gnupg" --import "${key}" &&
gpg --batch --homedir "${verifydir}/gnupg" \
--assert-signer "${validpgpkeys[0]}" \
--verify "${SRCDEST}/${release}.gpg" "${SRCDEST}/${release}" &&
echo "$(awk '/^SHA256:$/{section=1; next} /^$/{section=0} section && / non-free\/binary-amd64\/Packages$/ {print $1}' "${SRCDEST}/${release}") ${SRCDEST}/${packages}" \
| sha256sum -c - &&
echo "$(awk -F': ' '$1 == "SHA512" {print $2}' "${SRCDEST}/${packages}") ${SRCDEST}/spotify-client_${pkgver}_amd64.deb" \
| sha512sum -c -; then
status=0
else
status=$?
fi

rm -rf "${verifydir}"
return "${status}"
}

package() {
tar -xzf data.tar.gz --no-same-owner -C "${pkgdir}"

# Enable spotify to open URLs from the webapp
sed -i 's/^Exec=.*/Exec=spotify --uri=%u/' "${pkgdir}/usr/share/spotify/spotify.desktop"

install -Dm644 "${pkgdir}/usr/share/spotify/spotify.desktop" "${pkgdir}/usr/share/applications/spotify.desktop"
install -Dm644 "${pkgdir}/usr/share/spotify/icons/spotify-linux-512.png" "${pkgdir}/usr/share/pixmaps/spotify-client.png"

for size in 22 24 32 48 64 128 256 512; do
install -Dm644 "${pkgdir}/usr/share/spotify/icons/spotify-linux-${size}.png" \
"${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/spotify.png"
done

# Move spotify binary to its proper location
mkdir -p "${pkgdir}/opt/spotify"
mv "${pkgdir}/usr/share/spotify" "${pkgdir}/opt/"

# Copy launch script which allows the use of custom flags
install -Dm755 spotify.sh "${pkgdir}/usr/bin/spotify"

# Copy protocol file for KDE
install -Dm644 spotify.protocol "${pkgdir}/usr/share/kservices5/spotify.protocol"

# Install license
# https://www.spotify.com/legal/end-user-agreement
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

# Fix permissions
chmod -R go-w "${pkgdir}"
}
7 changes: 7 additions & 0 deletions spotify-bin/REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version = 1

[[annotations]]
path = [".gitignore", ".SRCINFO", "LICENSE", "PKGBUILD", "keys/**", "spotify.protocol", "spotify.sh"]
precedence = "aggregate"
SPDX-FileCopyrightText = "Arch Linux Contributors"
SPDX-License-Identifier = "0BSD"
Binary file not shown.
11 changes: 11 additions & 0 deletions spotify-bin/spotify.protocol
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Protocol]
exec=/usr/bin/spotify -uri "%u"
protocol=spotify
input=none
output=none
helper=true
listing=false
reading=false
writing=false
makedir=false
deleting=false
13 changes: 13 additions & 0 deletions spotify-bin/spotify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Substitute XDG_CONFIG_HOME by ~/.config if the env var is unset or empty
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config}

# Allow users to override command-line options
if [[ -f "${XDG_CONFIG_HOME}/spotify-flags.conf" ]]; then
mapfile -t SPOTIFY_USER_FLAGS <<< "$(grep -v '^#' "${XDG_CONFIG_HOME}/spotify-flags.conf")"
echo "User flags:" "${SPOTIFY_USER_FLAGS[@]}"
fi

# Launch Spotify with the given flags
exec /opt/spotify/spotify "${SPOTIFY_USER_FLAGS[@]}" "$@"