summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fa4047ad1b89d554d71e0ee3d63ca1189503dce6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Maintainer: Christoph Gysin <christoph.gysin@gmail.com>

pkgname=librespot-git
_pkgname=librespot
pkgver=218.f79df63
pkgrel=1
epoch=1
pkgdesc="An open source client library for Spotify."
arch=('i686' 'x86_64')
url="https://github.com/plietar/librespot"
license=('MIT')
depends=('rust' 'protobuf')
makedepends=('cargo')
provides=('librespot')
conflicts=('librespot')
source=('git+https://github.com/plietar/librespot'
        'librespot.conf'
        'librespot.service')
sha256sums=('SKIP'
            '3d48207e0be5cf2e68a9ecfd8f418aa1d71fa7f97d562780aa73d2db1a46cac5'
            'c41110008b16929c7e5f71512cea8dcf92fab36455a61bc2d56ced731918c602')

pkgver()
{
    cd $_pkgname
    echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build()
{
    cd $_pkgname
    cargo build \
        --features pulseaudio-backend \
        --release
}

package()
{
    install -D -m 755 $_pkgname/target/release/librespot \
        "${pkgdir}"/usr/bin/librespot
    install -d -m 755 "$pkgdir"/var/cache/librespot
    install -D -m 640 librespot.conf \
        "${pkgdir}"/etc/librespot.conf
    install -D -m 644 librespot.service \
        "${pkgdir}"/usr/lib/systemd/system/librespot.service
}