blob: 5963d8809b9acce9abe1345de807a2225c2b22e1 (
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
54
55
56
57
58
59
60
61
62
63
64
65
|
# Maintainer: Bert Peters <bert@bertptrs.nl>
# Contributor: Varakh <varakh@varakh.de>
# Contributor: Florian Klink <flokli@flokli.de>
pkgbase=spotifyd
pkgname=('spotifyd' 'spotifyd-pulseaudio' 'spotifyd-dbus-mpris' 'spotifyd-full')
pkgver=0.2.24
pkgrel=1
arch=('x86_64' 'armv6h' 'armv7h' 'aarch64')
license=('GPL3')
depends=('alsa-lib' 'libogg' 'gcc-libs')
makedepends=('cargo' 'libpulse' 'dbus')
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=('d3763f4647217a8f98ee938b50e141d67a5f3d33e9378894fde2a92c9845ef80')
_features=(''
'pulseaudio_backend'
'dbus_mpris'
'pulseaudio_backend,dbus_mpris,dbus_keyring,rodio_backend'
)
build() {
cd "$srcdir/spotifyd-$pkgver"
# Compile all variants. Compilation for later features can reuse
# previous build artifacts, so little overhead.
for feature in "${_features[@]}"; 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)
provides=(spotifyd)
pkgdesc="$pkgdesc, with pulseaudio support"
_package_feature pulseaudio_backend
}
package_spotifyd-dbus-mpris() {
depends=(alsa-lib libogg dbus)
conflicts=(spotifyd)
provides=(spotifyd)
pkgdesc="$pkgdesc, with D-Bus MPRIS"
_package_feature dbus_mpris
}
package_spotifyd-full() {
depends=(libpulse dbus)
conflicts=(spotifyd)
provides=(spotifyd)
pkgdesc="$pkgdesc, with all Linux features enabled"
_package_feature "${_features[3]}"
}
|