diff options
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 32 | ||||
-rw-r--r--[-rwxr-xr-x] | spotify.protocol | 0 | ||||
-rw-r--r-- | spotify.sh | 13 |
4 files changed, 37 insertions, 22 deletions
@@ -1,7 +1,7 @@ pkgbase = spotify pkgdesc = A proprietary music streaming service pkgver = 1.2.20.1210 - pkgrel = 1 + pkgrel = 2 epoch = 1 url = https://www.spotify.com arch = x86_64 @@ -20,16 +20,18 @@ pkgbase = spotify optdepends = zenity: Adds support for importing local files optdepends = libnotify: Desktop notifications options = !strip + source = spotify-1.2.20.1210-g2a8a8a57-x86_64.deb::http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.20.1210.g2a8a8a57_amd64.deb + source = spotify.sh source = spotify.protocol source = LICENSE - source = spotify-1.2.20.1210-g2a8a8a57-x86_64.deb::http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.20.1210.g2a8a8a57_amd64.deb - source = spotify-1.2.20.1210-1-Release::http://repository.spotify.com/dists/testing/Release - source = spotify-1.2.20.1210-1-Release.sig::http://repository.spotify.com/dists/testing/Release.gpg - source = spotify-1.2.20.1210-1-x86_64-Packages::http://repository.spotify.com/dists/testing/non-free/binary-amd64/Packages + source = spotify-1.2.20.1210-2-Release::http://repository.spotify.com/dists/testing/Release + source = spotify-1.2.20.1210-2-Release.sig::http://repository.spotify.com/dists/testing/Release.gpg + source = spotify-1.2.20.1210-2-x86_64-Packages::http://repository.spotify.com/dists/testing/non-free/binary-amd64/Packages validpgpkeys = E27409F51D1B66337F2D2F417A3A762FAFD4A51F + sha512sums = a527d6fecec9fa925d8c60e0ba8764ec8f53d3f5268d0b968d3bdeca7d367081f7faa0bcd1fe016491f15e37a1238ad40dbca1fc93b2533e0238e7a7a07f352b + sha512sums = f8c8af54ab2b52461867f72287bd7e716f64027776cd05a2787c28aa8722433ccca5db4262b48c52533b130cf651b00c25bacd614d74db40b16ec676d47542c7 sha512sums = 999abe46766a4101e27477f5c9f69394a4bb5c097e2e048ec2c6cb93dfa1743eb436bde3768af6ba1b90eaac78ea8589d82e621f9cbe7d9ab3f41acee6e8ca20 sha512sums = 2e16f7c7b09e9ecefaa11ab38eb7a792c62ae6f33d95ab1ff46d68995316324d8c5287b0d9ce142d1cf15158e61f594e930260abb8155467af8bc25779960615 - sha512sums = a527d6fecec9fa925d8c60e0ba8764ec8f53d3f5268d0b968d3bdeca7d367081f7faa0bcd1fe016491f15e37a1238ad40dbca1fc93b2533e0238e7a7a07f352b sha512sums = SKIP sha512sums = SKIP sha512sums = SKIP @@ -9,7 +9,7 @@ pkgname=spotify pkgver='1.2.20.1210' epoch=1 _commit=g2a8a8a57 -pkgrel=1 +pkgrel=2 pkgdesc='A proprietary music streaming service' arch=('x86_64') license=('custom') @@ -26,16 +26,18 @@ options=('!strip') # http://repository.spotify.com/dists/testing/Release # http://repository.spotify.com/dists/testing/non-free/binary-amd64/Packages # http://repository.spotify.com/dists/testing/Release.gpg -source=('spotify.protocol' - 'LICENSE' - "${pkgname}-${pkgver}-${_commit}-x86_64.deb::http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${pkgver}.${_commit}_amd64.deb" +source=("${pkgname}-${pkgver}-${_commit}-x86_64.deb::http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${pkgver}.${_commit}_amd64.deb" + "spotify.sh" + "spotify.protocol" + "LICENSE" # GPG signature check "${pkgname}-${pkgver}-${pkgrel}-Release::http://repository.spotify.com/dists/testing/Release" "${pkgname}-${pkgver}-${pkgrel}-Release.sig::http://repository.spotify.com/dists/testing/Release.gpg" "${pkgname}-${pkgver}-${pkgrel}-x86_64-Packages::http://repository.spotify.com/dists/testing/non-free/binary-amd64/Packages") -sha512sums=('999abe46766a4101e27477f5c9f69394a4bb5c097e2e048ec2c6cb93dfa1743eb436bde3768af6ba1b90eaac78ea8589d82e621f9cbe7d9ab3f41acee6e8ca20' +sha512sums=('a527d6fecec9fa925d8c60e0ba8764ec8f53d3f5268d0b968d3bdeca7d367081f7faa0bcd1fe016491f15e37a1238ad40dbca1fc93b2533e0238e7a7a07f352b' + 'f8c8af54ab2b52461867f72287bd7e716f64027776cd05a2787c28aa8722433ccca5db4262b48c52533b130cf651b00c25bacd614d74db40b16ec676d47542c7' + '999abe46766a4101e27477f5c9f69394a4bb5c097e2e048ec2c6cb93dfa1743eb436bde3768af6ba1b90eaac78ea8589d82e621f9cbe7d9ab3f41acee6e8ca20' '2e16f7c7b09e9ecefaa11ab38eb7a792c62ae6f33d95ab1ff46d68995316324d8c5287b0d9ce142d1cf15158e61f594e930260abb8155467af8bc25779960615' - 'a527d6fecec9fa925d8c60e0ba8764ec8f53d3f5268d0b968d3bdeca7d367081f7faa0bcd1fe016491f15e37a1238ad40dbca1fc93b2533e0238e7a7a07f352b' 'SKIP' 'SKIP' 'SKIP') @@ -61,30 +63,28 @@ prepare() { } package() { - cd "${srcdir}" - 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 + 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 + install -Dm 644 "${pkgdir}/usr/share/spotify/spotify.desktop" "${pkgdir}/usr/share/applications/spotify.desktop" + install -Dm 644 "${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" \ + install -Dm 644 "${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 + mkdir -p "${pkgdir}/opt/spotify" mv "${pkgdir}/usr/share/spotify" "${pkgdir}/opt/" - # Symlink spotify binary which is located in /opt - ln -sf /opt/spotify/spotify "${pkgdir}/usr/bin/spotify" + # Copy launch script which allows the use of custom flags + install -Dm 755 spotify.sh "${pkgdir}/usr/bin/spotify" # Copy protocol file for KDE - install -Dm644 "${srcdir}/spotify.protocol" "${pkgdir}/usr/share/kservices5/spotify.protocol" + install -Dm 644 spotify.protocol "${pkgdir}/usr/share/kservices5/spotify.protocol" # Install license # https://www.spotify.com/legal/end-user-agreement diff --git a/spotify.protocol b/spotify.protocol index 423a5fc2e7dc..423a5fc2e7dc 100755..100644 --- a/spotify.protocol +++ b/spotify.protocol diff --git a/spotify.sh b/spotify.sh new file mode 100644 index 000000000000..8ee5f63fa953 --- /dev/null +++ b/spotify.sh @@ -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 + SPOTIFY_USER_FLAGS="$(grep -v '^#' "${XDG_CONFIG_HOME}/spotify-flags.conf")" + echo "User flags: ${SPOTIFY_USER_FLAGS}" +fi + +# Launch Spotify +exec /opt/spotify/spotify "${SPOTIFY_USER_FLAGS}" "${@}" |