Merge pull request #897 from teh-jazzman/spotify
New package: spotify-0.9_1
This commit is contained in:
commit
07dd083c2f
54
srcpkgs/spotify/INSTALL
Normal file
54
srcpkgs/spotify/INSTALL
Normal file
@ -0,0 +1,54 @@
|
||||
# INSTALL for 'spotify'
|
||||
# Fetching proprietary binaries at install-time
|
||||
|
||||
_BUILDDIR="/tmp/spotify.build"
|
||||
_LIBS=$(ldconfig -vNX -n /usr/lib 2>/dev/null)
|
||||
|
||||
linklib() {
|
||||
_LIB=$(echo "$_LIBS" | grep "${1}\.so" | sed 's/\s*\([^ ]*\).*$/\1/')
|
||||
ln -s "/usr/lib/${_LIB}" "/usr/share/spotify/libs/${1}.so.${2}"
|
||||
}
|
||||
|
||||
if test "$ACTION" = "post"; then
|
||||
. /usr/share/spotify/pkgdata
|
||||
mkdir -p "$_BUILDDIR"
|
||||
(
|
||||
cd "$_BUILDDIR"
|
||||
xbps-uhelper fetch "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${SVERSION}.deb"
|
||||
echo "${SCHECKSUM} spotify-client_${SVERSION}.deb" >checksum
|
||||
sha256sum -c checksum || exit 1
|
||||
ar x "spotify-client_${SVERSION}.deb"
|
||||
tar xzf data.tar.gz 2>/dev/null
|
||||
) || {
|
||||
echo Error while extracting;
|
||||
rm -r "$_BUILDDIR";
|
||||
exit 1;
|
||||
}
|
||||
mkdir -p /usr/share/licenses/spotify
|
||||
mv "${_BUILDDIR}/usr/share/doc/spotify-client/copyright" /usr/share/licenses/spotify/
|
||||
mv "${_BUILDDIR}/opt/spotify/spotify-client" /usr/share/spotify/spotify-client
|
||||
for _s in 16 22 24 32 48 64 128 256 512; do
|
||||
mkdir -p "/usr/share/icons/hicolor/${_s}x${_s}/apps"
|
||||
ln -s "/usr/share/spotify/spotify-client/Icons/spotify-linux-${_s}.png" "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
|
||||
done
|
||||
mkdir -p /usr/share/applications
|
||||
ln -s /usr/share/spotify/spotify-client/spotify.desktop /usr/share/applications/spotify.desktop
|
||||
|
||||
if test "$ARCH" = "x86_64"; then
|
||||
linklib "libssl" "1.0.0"
|
||||
linklib "libcrypto" "1.0.0"
|
||||
linklib "libudev" "0"
|
||||
else
|
||||
linklib "libssl" "0.9.8"
|
||||
linklib "libcrypto" "0.9.8"
|
||||
linklib "libnss3" "1d"
|
||||
linklib "libnssutil3" "1d"
|
||||
linklib "libsmime3" "1d"
|
||||
linklib "libplc4" "0d"
|
||||
linklib "libnspr4" "0d"
|
||||
linklib "libudev" "0"
|
||||
fi
|
||||
|
||||
rm -r "$_BUILDDIR"
|
||||
fi
|
||||
|
12
srcpkgs/spotify/REMOVE
Normal file
12
srcpkgs/spotify/REMOVE
Normal file
@ -0,0 +1,12 @@
|
||||
# REMOVE for 'spotify'
|
||||
# Deleting dynamically fetched files
|
||||
|
||||
if test "$ACTION" = "post"; then
|
||||
rm -r /usr/share/licenses/spotify
|
||||
rm /usr/share/applications/spotify.desktop
|
||||
for _s in 16 22 24 32 48 64 128 256 512; do
|
||||
rm "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
|
||||
done
|
||||
rm -r /usr/share/spotify
|
||||
fi
|
||||
|
2
srcpkgs/spotify/files/spotify
Normal file
2
srcpkgs/spotify/files/spotify
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
LD_LIBRARY_PATH=/usr/share/spotify/libs exec /usr/share/spotify/spotify-client/spotify "$@"
|
43
srcpkgs/spotify/template
Normal file
43
srcpkgs/spotify/template
Normal file
@ -0,0 +1,43 @@
|
||||
# Template build file for 'spotify'.
|
||||
pkgname=spotify
|
||||
version=0.9
|
||||
revision=2
|
||||
short_desc="Proprietary music streaming client"
|
||||
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
|
||||
homepage="https://www.spotify.com"
|
||||
license="Proprietary"
|
||||
create_wrksrc=1
|
||||
only_for_archs="x86_64 i686"
|
||||
repository=nonfree
|
||||
build_style=fetch
|
||||
makedepends="libgpg-error-devel"
|
||||
distfiles="ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.4.tar.bz2"
|
||||
checksum="d5f88d9f41a46953dc250cdb8575129b37ee2208401b7fa338c897f667c7fb33"
|
||||
depends="binutils qt gtk+ nss GConf libXScrnSaver"
|
||||
|
||||
if test "${XBPS_TARGET_MACHINE}" = "x86_64"; then
|
||||
_sversion=".11.27.g2b1a638.81-1_amd64"
|
||||
_schecksum="4f93776cac562f622e635c64fa61ee46cb9bdfbda0a2aff0905acf007894d479"
|
||||
depends+=" pango-xft"
|
||||
else
|
||||
_sversion=".4.183.g644e24e.428-1_i386"
|
||||
_schecksum="ca45d057357e4c30efee3838dd941222500463ddd0a1db6981e4d48d7ad986f2"
|
||||
fi
|
||||
|
||||
do_extract() {
|
||||
tar xjf "${XBPS_SRCDISTDIR}/spotify-${version}/libgcrypt-1.5.4.tar.bz2"
|
||||
}
|
||||
|
||||
do_build() {
|
||||
cd libgcrypt-1.5.4
|
||||
./configure ${configure_args}
|
||||
make
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vbin ${FILESDIR}/spotify
|
||||
vmkdir usr/share/spotify/libs
|
||||
vinstall libgcrypt-1.5.4/src/.libs/libgcrypt.so.11.8.3 755 usr/share/spotify/libs libgcrypt.so.11
|
||||
echo "export SVERSION=\"${version}${_sversion}\"" >"${DESTDIR}/usr/share/spotify/pkgdata"
|
||||
echo "export SCHECKSUM=\"${_schecksum}\"" >>"${DESTDIR}/usr/share/spotify/pkgdata"
|
||||
}
|
9
srcpkgs/spotify/update
Normal file
9
srcpkgs/spotify/update
Normal file
@ -0,0 +1,9 @@
|
||||
site="http://repository.spotify.com/pool/non-free/s/spotify/"
|
||||
version="${version}${_sversion}"
|
||||
pattern='>spotify-client_\K.+(?=\.deb<)'
|
||||
|
||||
if test "${XBPS_TARGET_MACHINE}" = "x86_64"; then
|
||||
ignore="*_i386*"
|
||||
else
|
||||
ignore="*_amd64*"
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user