aboutsummaryrefslogtreecommitdiffstats
path: root/community/mpc/APKBUILD
blob: 77aa86594a9460138c524305be23d6af795db947 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpc
pkgver=0.32
pkgrel=0
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
	doc-py3.patch
	"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=release \
		-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="1913249da8b29123005a9877ff2e68f9469f8fd48f5411ea0e651255c93fbe14ef6029dadc7d256a99b566085dc19f4c62bdcf55260b27de3d088b8e9c17fcde  mpc-0.32.tar.xz
7be9a58480b5b7b78e411272aa1ccc996e3c837b954c14cfed9cbed31897ae0c34afc4fad5e7dc7ad194dc6e24cebcff7e063610db73f94327de4c9656a946c5  doc-py3.patch"