archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / spotifyd / trunk / PKGBUILD
blob0975b17b75c8f69224224d93cb412a2077ef48b9
1 # Maintainer: Frederik Schwan <freswa at archlinux dot org>
2 # Contributor: Bert Peters <bert@bertptrs.nl>
3 # Contributor: Varakh <varakh@varakh.de>
4 # Contributor: Florian Klink <flokli@flokli.de>
6 pkgname=spotifyd
7 pkgver=0.3.5
8 pkgrel=1
9 pkgdesc='Lightweight spotify streaming daemon with spotify connect support'
10 arch=('x86_64')
11 url='https://github.com/Spotifyd/spotifyd'
12 license=('GPL3')
13 depends=('alsa-lib' 'libogg' 'libpulse' 'dbus')
14 makedepends=('rust')
15 options=(!lto)
16 source=("https://github.com/Spotifyd/spotifyd/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
17 b2sums=('dd266f499f960b4f0e37e8c89d73286c0efc9f7c782007e6df901a9b432a88f4fb276666d5ec16c3408633eeb53950b45cfe32884f9a0ecfdb27430f412ac99a')
19 prepare() {
20   cd spotifyd-${pkgver}
21   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
24 build() {
25   cd spotifyd-${pkgver}
26   export RUSTUP_TOOLCHAIN=stable
27   export CARGO_TARGET_DIR=target
28   cargo build --release --locked --features pulseaudio_backend,dbus_mpris,dbus_keyring,rodio_backend
31 check() {
32   cd spotifyd-${pkgver}
33   export RUSTUP_TOOLCHAIN=stable
34   cargo test --release --locked --target-dir=target
35  }
37 package() {
38   cd spotifyd-${pkgver}
39   cargo install --locked --root "${pkgdir}"/usr --path "${srcdir}"/${pkgbase}-${pkgver} --features pulseaudio_backend,dbus_mpris,dbus_keyring,rodio_backend
40   rm "${pkgdir}"/usr/{.crates.toml,.crates2.json}
41   install -Dm644 -t "${pkgdir}"/usr/lib/systemd/user/ "${srcdir}"/${pkgbase}-${pkgver}/contrib/spotifyd.service