aboutsummaryrefslogtreecommitdiffstats
path: root/community/mpc/APKBUILD
blob: 14fc80f614993a3b961b48a17d3ac49ce6a41e24 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpc
pkgver=0.33
pkgrel=2
pkgdesc="Minimalist command line interface to MPD"
url="https://www.musicpd.org/clients/mpc/"
arch="all"
license="GPL-2.0-or-later"
makedepends="libmpdclient-dev py3-sphinx meson check-dev"
subpackages="$pkgname-bash-completion:bashcomp:noarch $pkgname-doc"
source="https://www.musicpd.org/download/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Dtest=true \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
	mv "$pkgdir"/usr/share/doc/mpc/contrib/mpc-completion.bash \
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname
}

sha512sums="d3247dfb54ac3c95caf5666088968a952b33eb7e8f941bca4f3715603839cf5a1bc5300488c78fdce6e38f612b243f2252ea682b8d0fec9f230acd760bf3560c  mpc-0.33.tar.xz"