aboutsummaryrefslogtreecommitdiffstats
path: root/community/mpv/APKBUILD
blob: 94bc5161278a298eff37b77e180b82bce85f4396 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Jakub Skrzypnik <j.skrzypnik@openmailbox.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpv
pkgver=0.27.0
pkgrel=1
pkgdesc="Video player based on MPlayer/mplayer2"
url="https://mpv.io/"
arch="all"
license="GPL2+ LGPL2+"
depends=""
makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev
	libtheora-dev xvidcore-dev zlib-dev sdl-dev freetype-dev
	x264-dev faac-dev ttf-dejavu libxvmc-dev alsa-lib-dev libva-dev
	mesa-dev ffmpeg-dev libass-dev perl lua5.2-dev libvdpau-dev python2
	libxext-dev libxinerama-dev libxscrnsaver-dev py-docutils rsound-dev libxrandr-dev"
subpackages="
	$pkgname-doc
	$pkgname-libs
	$pkgname-zsh-completion:zshcomp:noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare || return 1
	cd "$builddir"
	./bootstrap.py
}

build() {
	cd "$builddir"
	./waf configure --prefix=/usr \
		--mandir=/usr/share/man \
		--confdir=/etc/mpv \
		--enable-alsa \
		--enable-libass \
		--enable-libmpv-shared \
		--enable-rsound \
		--enable-zsh-comp \
		|| return 1
	./waf build || return 1
}

package() {
	cd "$builddir"
	./waf install --destdir="$pkgdir" || return 1

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	install -m644 "$builddir"/DOCS/*.rst "$builddir"/DOCS/*.md \
			"$pkgdir"/usr/share/doc/$pkgname/ || return 1

	# Move example configuration files to subdirectory
	mkdir -p "$pkgdir"/usr/share/doc/mpv/examples
	mv "$pkgdir"/usr/share/doc/mpv/*.conf \
		"$pkgdir"/usr/share/doc/mpv/examples/ || return 1
}

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

	mkdir -p "$subpkgdir/usr/share/zsh/site-functions"
	mv "$pkgdir/usr/share/zsh/site-functions"/* \
		"$subpkgdir/usr/share/zsh/site-functions" || return 1
}

sha512sums="22738f907d84d362095773972f685e3b03ab4c8172a22ddede290fc221a83ab9135b96f8b18191dabe842b2963f68983929cf065097287fc1a054a7d5f1d0ae4  mpv-0.27.0.tar.gz"