diff options
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 51 |
2 files changed, 38 insertions, 24 deletions
@@ -1,11 +1,9 @@ -# Generated by mksrcinfo v8 -# Fri Jan 26 12:13:00 UTC 2018 pkgbase = librespot-git - pkgdesc = An open source client library for Spotify. - pkgver = 363.8971d3a + pkgdesc = Open Source Spotify client library + pkgver = 1435.e5fd7d6 pkgrel = 1 epoch = 1 - url = https://github.com/plietar/librespot + url = https://github.com/librespot-org/librespot arch = i686 arch = x86_64 arch = armv6h @@ -18,8 +16,7 @@ pkgbase = librespot-git depends = alsa-lib provides = librespot conflicts = librespot - source = git+https://github.com/plietar/librespot + source = git+https://github.com/librespot-org/librespot sha256sums = SKIP pkgname = librespot-git - @@ -2,41 +2,58 @@ pkgname=librespot-git _pkgname=librespot -pkgver=363.8971d3a +pkgver=1435.e5fd7d6 pkgrel=1 epoch=1 -pkgdesc="An open source client library for Spotify." +pkgdesc="Open Source Spotify client library" arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') -url="https://github.com/plietar/librespot" +url="https://github.com/librespot-org/librespot" license=('MIT') depends=('libvorbis' 'alsa-lib') makedepends=('git' 'rust') provides=('librespot') conflicts=('librespot') -source=('git+https://github.com/plietar/librespot') +source=('git+https://github.com/librespot-org/librespot') sha256sums=('SKIP') -pkgver() -{ +pkgver() { cd "$_pkgname" echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD) } -build() -{ +prepare() { + cd "$_pkgname" + + case "$CARCH" in + armv6h) target=arm-unknown-linux-gnueabihf;; + armv7h) target=armv7-unknown-linux-gnueabihf;; + *) target="$CARCH-unknown-linux-gnu";; + esac + + cargo fetch \ + --locked \ + --target "$target" +} + +build() { cd "$_pkgname" cargo build \ - --no-default-features \ - --features alsa-backend \ + --frozen \ --release } -package() -{ - install -D -m 755 "$_pkgname"/target/release/librespot \ - "$pkgdir"/usr/bin/librespot - install -D -m 644 "$_pkgname"/contrib/librespot.service \ +package() { + cd "$_pkgname" + cargo install \ + --no-track \ + --locked \ + --root "$pkgdir/usr" \ + --path . + + install -D -m 644 contrib/librespot.service \ "$pkgdir"/usr/lib/systemd/system/librespot.service - install -D -m 644 "$_pkgname"/LICENSE \ - "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -D -m 644 contrib/librespot.user.service \ + "$pkgdir"/usr/lib/systemd/user/librespot.service + install -D -m 644 LICENSE \ + "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } |