blob: 510f638f8889a84e6c15b11206b0b89008381508 (
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
47
48
49
50
51
52
53
|
# Maintainer: Bert Peters <bert@bertptrs.nl>
# Contributor: Alexander Schäferdiek <alexander@schaeferdiek.eu>
# Contributor: Florian Klink <flokli@flokli.de>
pkgbase=spotifyd
pkgname=('spotifyd' 'spotifyd-pulseaudio' 'spotifyd-dbus-mpris')
pkgver=0.2.4
pkgrel=1
arch=('x86_64' 'armv7h' 'aarch64')
license=('GPL3')
depends=('alsa-lib' 'libogg' 'gcc-libs')
makedepends=('cargo' 'libpulse')
pkgdesc="A spotify playing daemon"
url="https://github.com/Spotifyd/$pkgbase"
source=("$pkgbase-$pkgver.tar.gz::https://github.com/Spotifyd/$pkgbase/archive/v$pkgver.tar.gz")
sha256sums=('05359f6b9e93cd64c3dfada42341dd3b3999f7d695093f5e831164016b945dd3')
prepare() {
cd "$srcdir/spotifyd-$pkgver"
}
build() {
cd "$srcdir/spotifyd-$pkgver"
# Compile all variants. Compilation for later features can reuse
# previous build artifacts, so little overhead.
for feature in "" pulseaudio_backend dbus_mpris; do
cargo build --release --locked --features "$feature"
done
}
_package_feature() {
# Create a package for a particular feature.
cargo install --locked --root "$pkgdir/usr" --path "$srcdir/$pkgbase-$pkgver" --features "$1"
rm "$pkgdir/usr/.crates.toml"
install -D -m 644 "$srcdir/$pkgbase-$pkgver/contrib/spotifyd.service" "$pkgdir/usr/lib/systemd/user/spotifyd.service"
}
package_spotifyd() {
_package_feature "" # no features
}
package_spotifyd-pulseaudio() {
depends=(libpulse)
conflicts=(spotifyd)
pkgdesc="$pkgdesc, with pulseaudio support"
_package_feature pulseaudio_backend
}
package_spotifyd-dbus-mpris() {
conflicts=(spotifyd)
pkgdesc="$pkgdesc, with D-Bus MPRIS"
_package_feature dbus_mpris
}
|