This commit is contained in:
parent
2d6c37fc7f
commit
bb943d0534
2 changed files with 71 additions and 0 deletions
68
spotify/APKBUILD
Normal file
68
spotify/APKBUILD
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
|
||||
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
|
||||
pkgname=spotify
|
||||
pkgver=1.1.72.439
|
||||
_pkgver="1.1.72.439.gc253025e"
|
||||
pkgrel=0
|
||||
pkgdesc="Spotify desktop player"
|
||||
url="https://www.spotify.com/us/download/linux/"
|
||||
arch="x86_64"
|
||||
license="custom"
|
||||
makedepends="binutils patchelf"
|
||||
# needs latest gcompat for __mbrlen, __close and fixed random_r
|
||||
_gcompat_commit="4d6a5156a6eb7f56b30d93853a872e36dadde81b"
|
||||
source="https://repository-origin.spotify.com/pool/non-free/s/spotify-client/spotify-client_${_pkgver}_amd64.deb
|
||||
https://git.adelielinux.org/adelie/gcompat/-/archive/$_gcompat_commit/gcompat-$_gcompat_commit.tar.gz
|
||||
launcher
|
||||
"
|
||||
options="!check !strip"
|
||||
|
||||
unpack() {
|
||||
cd "$srcdir"
|
||||
ar x spotify-client_"$_pkgver"_amd64.deb data.tar.gz
|
||||
|
||||
mkdir "$pkgname-$pkgver"
|
||||
tar -xzf data.tar.gz -C "$pkgname-$pkgver/"
|
||||
|
||||
default_unpack
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/gcompat-"$_gcompat_commit"
|
||||
sed -i '/readlink/d' Makefile
|
||||
make
|
||||
mv libgcompat.so.0 "$builddir"/usr/share/spotify/libgcompat-spotify.so.0
|
||||
|
||||
cd "$builddir"/usr/share/spotify
|
||||
|
||||
# replace glibc with gcompat
|
||||
patchelf --set-interpreter /lib/ld-musl-x86_64.so.1 spotify
|
||||
patchelf --add-needed libgcompat-spotify.so.0 spotify
|
||||
patchelf --remove-needed libdl.so.2 spotify
|
||||
patchelf --remove-needed libm.so.6 spotify
|
||||
|
||||
# fix curl library name
|
||||
patchelf --remove-needed libcurl-gnutls.so.4 spotify
|
||||
patchelf --add-needed libcurl.so.4 spotify
|
||||
|
||||
# remove glibc references
|
||||
scanelf --nobanner --recursive --needed . | grep ld-linux | awk '{ print $3 }' \
|
||||
| while read -r soname; do
|
||||
patchelf --remove-needed ld-linux-x86-64.so.2 $soname
|
||||
done
|
||||
|
||||
rm "$builddir"/usr/bin/spotify
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"
|
||||
# TODO: move files to "correct" places (is it even doable?)
|
||||
cp -r usr "$pkgdir"
|
||||
install -Dm755 "$srcdir"/launcher "$pkgdir"/usr/bin/spotify
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
65cec95448d936b7be93b0d16f29927a298b5b56aa2bc4834a5d357e341c78486fa69e61b3b6cf9fbe7da88c8d3b6ce3bccb5e963ed1b5a23320c0c808ccb385 spotify-client_1.1.72.439.gc253025e_amd64.deb
|
||||
eed0f2a8cb7fae898096139f3e3b481c3eb21bced8810fc7cef7bf25e2a6cccce6a4b93ed88d52bc11ffc0748eb89bd29ee6f36c8c860ceef1052f1bb924fef4 gcompat-4d6a5156a6eb7f56b30d93853a872e36dadde81b.tar.gz
|
||||
c5f22dffd9c2bca50331dda04bcaae30d035c60bdfb4c40c1f248e0a973233fb9d934c881df7cae04e79b963a204a55b533dc3f476377dbdc4ab265afa63ea10 launcher
|
||||
"
|
3
spotify/launcher
Normal file
3
spotify/launcher
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec /usr/share/spotify/spotify --single-process $@
|
Loading…
Reference in a new issue