aboutsummaryrefslogtreecommitdiffstats
path: root/community/mpc/APKBUILD
blob: 3dba8e9927a22855b7bda926d027a49db8f77d37 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpc
pkgver=0.31
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 py-sphinx meson"
subpackages="$pkgname-bash-completion:bashcomp:noarch $pkgname-doc"
source="https://www.musicpd.org/download/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=release \
		. output
	ninja -C output
}

package() {
	cd "$builddir"
	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="48df7d85df704ae901ee0a07193daf9738b682b71a24ebd5bf4458aa562acd11b582f83adcfca814faa9a014ef565cb6c23df837b83a569fd6050f9f3802e6fe  mpc-0.31.tar.xz"