aboutsummaryrefslogtreecommitdiffstats
path: root/community/cmus/APKBUILD
blob: 2c1a7e96fa5bee002927a6a5f671feb2f24eec01 (plain) (blame)
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
55
56
57
58
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Maintainer:
pkgname=cmus
pkgver=2.8.0_rc0
pkgrel=0
_ver=${pkgver/_rc/-rc}
pkgdesc="A very feature-rich ncurses-based music player"
url="http://cmus.sourceforge.net/"
arch="all"
license="GPL-2.0-or-later"
depends=""
depends_dev=""
makedepends="alsa-lib-dev faad2-dev flac-dev libmad-dev opusfile-dev
	libogg-dev libvorbis-dev ncurses-dev wavpack-dev ffmpeg-dev
	linux-headers"
install=""
subpackages="
	$pkgname-doc
	$pkgname-zsh-completion:zshcomp:noarch
	$pkgname-bash-completion:bashcomp:noarch"
source="$pkgname-$_ver.tar.gz::https://github.com/cmus/cmus/archive/v${_ver}.tar.gz"

builddir="$srcdir"/$pkgname-$_ver
build() {
	cd "$builddir"
	./configure prefix=/usr || return 1
	make || return 1
}

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

	for file in AUTHORS README.md; do
		install -Dm644 "${file}" "$pkgdir"/usr/share/doc/$pkgname/ || return 1
	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"