aboutsummaryrefslogtreecommitdiffstats
path: root/community/cmus/APKBUILD
blob: cabba2627c287085169c68b243066d6e50349a21 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Maintainer:
pkgname=cmus
pkgver=2.8.0_rc0
_pkgver=${pkgver/_rc/-rc}
pkgrel=0
pkgdesc="A very feature-rich ncurses-based music player"
url="https://cmus.github.io/"
arch="all"
license="GPL-2.0-or-later"
options="!check" # No test suite
makedepends="alsa-lib-dev faad2-dev flac-dev libmad-dev opusfile-dev
	libogg-dev libvorbis-dev ncurses-dev wavpack-dev ffmpeg-dev
	linux-headers"
subpackages="$pkgname-doc $pkgname-zsh-completion:zshcomp:noarch
	$pkgname-bash-completion:bashcomp:noarch"
source="$pkgname-$_pkgver.tar.gz::https://github.com/cmus/cmus/archive/v$_pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$_pkgver

build() {
	cd "$builddir"
	./configure prefix=/usr
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	for file in AUTHORS README.md; do
		install -Dm644 "${file}" "$pkgdir"/usr/share/doc/$pkgname/
	done
}

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

	install -Dm644 "$builddir"/contrib/$pkgname.bash-completion \
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname
}

zshcomp() {
	depends=""
	pkgdesc="Zsh completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	install -Dm644 "$builddir"/contrib/_$pkgname \
		"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
}

sha512sums="0379f18497d6510fad35a2d905c932d12f2726a5694d3ab272ce139e9ea4520cb4dd1cf3fafe890f6ada8a64285f8c04ef7571647a66c2d44df17e2dca80f869  cmus-2.8.0-rc0.tar.gz"