-
-
Save NicoHood/5ae26f778d4c62aee32e4b56081cc925 to your computer and use it in GitHub Desktop.
spotify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Ashley Whetter <(firstname) @ awhetter.co.uk> | |
# Co-Maintainer: NicoHood <archlinux {cat} nicohood {dog} de> | |
# Contributor: Eothred <yngve.levinsen@gmail.com> | |
pkgname=spotify | |
pkgver=1.0.43.125 | |
_commit=g376063c5 | |
pkgrel=1 | |
pkgdesc="A proprietary music streaming service" | |
arch=('x86_64' 'i686') | |
license=('custom') | |
url="https://www.spotify.com" | |
depends=("alsa-lib>=1.0.14" "gconf" "gtk2" "glib2" "nss" "libsystemd" "libxtst" "libx11" "libxss" "libcurl-compat" "desktop-file-utils" "rtmpdump") | |
optdepends=('ffmpeg0.10: Adds support for playback of local files' | |
'zenity: Adds support for importing local files' | |
'libnotify: Desktop notifications') | |
options=('!strip' '!upx') | |
# http://repository.spotify.com/dists/testing/Release | |
# http://repository.spotify.com/dists/testing/non-free/binary-amd64/Packages | |
# http://repository.spotify.com/dists/testing/non-free/binary-i386/Packages | |
# http://repository.spotify.com/dists/testing/Release.gpg | |
source=('spotify.sh' | |
'spotify.protocol' | |
'LICENSE' | |
"${pkgname}-${pkgver}-Release::http://repository.spotify.com/dists/testing/Release" | |
"${pkgname}-${pkgver}-Release.sig::http://repository.spotify.com/dists/testing/Release.gpg") | |
source_x86_64=("${pkgname}-${pkgver}-${CARCH}.deb::http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${pkgver}.${_commit}-91_amd64.deb" | |
"${pkgname}-${pkgver}-${CARCH}-Packages::http://repository.spotify.com/dists/testing/non-free/binary-amd64/Packages") | |
source_i686=("${pkgname}-${pkgver}-${CARCH}.deb::http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.0.43.123.g80176796-25_i386.deb" | |
"${pkgname}-${pkgver}-${CARCH}-Packages::http://repository.spotify.com/dists/testing/non-free/binary-i386/Packages") | |
sha512sums=('73124cb25e831534c94232ad607d6cf7716c6fb5e0cbb7ad4cd0976a45f6fa9efdc50c58109cd9594021476c9879d6b1a90cdb4ecbb03d5ad89ae52c82fc473a' | |
'999abe46766a4101e27477f5c9f69394a4bb5c097e2e048ec2c6cb93dfa1743eb436bde3768af6ba1b90eaac78ea8589d82e621f9cbe7d9ab3f41acee6e8ca20' | |
'2e16f7c7b09e9ecefaa11ab38eb7a792c62ae6f33d95ab1ff46d68995316324d8c5287b0d9ce142d1cf15158e61f594e930260abb8155467af8bc25779960615' | |
'14fc3651822b01232c21bbc76d8d9e253eadc9764c4f0be7476d2f2abd7336fa796c6fd69e34c3384d9f624526e69679028aaa4c32f467e38f8990edf3be9e27' | |
'd8cbbbce4f84c912699c9ec5dacbbdb0ba83e698c9088f7ce1252c97d889d8bf224d2f41778e7f4321bb37cb3c605a44e24fb481b969ba322c02e44775e2f390') | |
sha512sums_x86_64=('612ec8e06d0197460656315c314d1e1f4a1da4ab591c186288c5fc383d2902e20f9f8e0f4b1f9513e462a12a7fe98eb78ade90f650841556574164e3ad386f6e' | |
'b0892bdbd201f7c582066758c0b9b98c09db674198b90f01d266cd5ff02cdfafc12c9bd7bd866c161517fd90a299c0e2b5b3987edb66f41eaba0de58491a5747') | |
sha512sums_i686=('a98d38e17895dcef06decc32dae45bf59ca21c6980f306ce21f325ca3371ccd9392f4c99d3d5dd57cd085b504b2e81954aa94d3f0cac4a744b0a725a160b4698' | |
'a4ff48148542e2dff153296a95d4ded7dc9780bc3ba96ee6c86262be98b64fa8d0fa9fbee404c3bd168e6d8c2ad230ef01fb6be03cdc36425b191cad3f8fbc46') | |
validpgpkeys=('BBEBDCB318AD50EC6865090613B00F1FD2C19886') | |
# Spotify uses different names for the arch | |
if [ "${CARCH}" = "i686" ]; then | |
_SPOTIFY_ARCH=i386 | |
else | |
_SPOTIFY_ARCH=amd64 | |
fi | |
prepare() { | |
# Validate hashes from the PGP signed "Release" file | |
echo "$(grep non-free/binary-${_SPOTIFY_ARCH}/Packages ${pkgname}-${pkgver}-Release | tail -n 2 | head -n 1 | awk '{print $1}') ${pkgname}-${pkgver}-${CARCH}-Packages" > "${pkgname}-${pkgver}-${CARCH}-Packages.sha256" | |
sha256sum -c "${pkgname}-${pkgver}-${CARCH}-Packages.sha256" | |
echo "$(grep SHA512 ${pkgname}-${pkgver}-${CARCH}-Packages | awk '{print $2}') ${pkgname}-${pkgver}-${CARCH}.deb" > "${pkgname}-${pkgver}-${CARCH}.deb.sha512" | |
sha512sum -c "${pkgname}-${pkgver}-${CARCH}.deb.sha512" | |
} | |
package() { | |
cd "${srcdir}" | |
tar -xzf data.tar.gz -C "${pkgdir}" | |
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 | |
rm -r "${pkgdir}/usr/share/spotify/icons/" | |
chmod -R go-w "${pkgdir}"/usr | |
# Move spotify binary to its proper location and instal wrapper script | |
mkdir -p "${pkgdir}"/opt/spotify | |
mv "${pkgdir}/usr/share/spotify" "${pkgdir}/opt/" | |
rm "${pkgdir}"/usr/bin/spotify | |
install -Dm755 "${srcdir}/spotify.sh" "${pkgdir}/usr/bin/spotify" | |
# Copy protocol file for KDE | |
install -Dm644 "${srcdir}/spotify.protocol" "${pkgdir}/usr/share/kservices5/spotify.protocol" | |
# Install license | |
# https://www.spotify.com/legal/end-user-agreement | |
install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LD_PRELOAD=libcurl.so.3 /opt/spotify/spotify "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment