blob: a68489484e6f991584fb602ca38410f8142c929a (
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
|
# Maintainer: elomatreb <ole@bertr.am>
pkgname=listenbrainz-mpd
pkgver=2.3.8
pkgrel=1
pkgdesc="ListenBrainz submission client for MPD"
arch=('x86_64')
url='https://codeberg.org/elomatreb/listenbrainz-mpd'
license=('AGPL3')
depends=('sqlite' 'libssl.so=3-64' 'libcrypto.so=3-64')
makedepends=('openssl' 'cargo' 'asciidoctor')
source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
b2sums=('ea4a72df8e19d7afa5fdc31388e328658dca8a2322a0296d5b2819e09af978a0825b3f8de7fb021983235ac3ac302ac0748abc1cf51b1bb37995952db3841850')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
cargo fetch --locked --target "$(rustc -vV | sed -n 's|host: ||p')"
}
build() {
cd "$srcdir/$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
export RUSTFLAGS="-C target-cpu=native"
cargo build --frozen --release --features shell_completion,systemd
asciidoctor --backend=manpage listenbrainz-mpd.adoc
}
package() {
cd "$srcdir/$pkgname-$pkgver"
install -Dm0755 "$srcdir/$pkgname-$pkgver/target/release/listenbrainz-mpd" "$pkgdir/usr/bin/listenbrainz-mpd"
install -Dm0644 listenbrainz-mpd.service "$pkgdir/usr/lib/systemd/user/listenbrainz-mpd.service"
install -Dm0644 listenbrainz-mpd.1 "$pkgdir/usr/share/man/man1/listenbrainz-mpd.1"
install -Dm0644 generated_completions/listenbrainz-mpd.bash "$pkgdir/usr/share/bash-completion/completions/listenbrainz-mpd"
install -Dm0644 generated_completions/listenbrainz-mpd.fish "$pkgdir/usr/share/fish/vendor_completions.d/listenbrainz-mpd.fish"
install -Dm0644 generated_completions/_listenbrainz-mpd "$pkgdir/usr/share/zsh/site-functions/_listenbrainz-mpd"
}
|