APKBUILD 2.13 KB
Newer Older
1
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
Łukasz Jendrysik's avatar
Łukasz Jendrysik committed
2
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
3
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
4
# Contributor: Jakub Skrzypnik <j.skrzypnik@openmailbox.org>
5 6
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpv
tmpt's avatar
tmpt committed
7
pkgver=0.25.0
8
pkgrel=1
9 10
pkgdesc="Video player based on MPlayer/mplayer2"
url="http://mpv.io/"
11
arch="all"
12
license="GPL2+"
13
depends=""
14 15
makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev
	libtheora-dev xvidcore-dev zlib-dev sdl-dev freetype-dev
16
	x264-dev faac-dev ttf-dejavu libxvmc-dev alsa-lib-dev libva-dev
17
	mesa-dev ffmpeg-dev libass-dev perl lua5.2-dev libvdpau-dev python2
tmpt's avatar
tmpt committed
18
	libxext-dev libxinerama-dev libxscrnsaver-dev py-docutils rsound-dev libxrandr-dev"
19 20 21
subpackages="
	$pkgname-doc
	$pkgname-libs
22
	$pkgname-zsh-completion:zshcomp:noarch"
23
source="$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/$pkgname/archive/v$pkgver.tar.gz"
24
builddir="$srcdir/$pkgname-$pkgver"
25 26

prepare() {
27 28 29
	default_prepare || return 1
	cd "$builddir"
	./bootstrap.py
30 31 32
}

build() {
33
	cd "$builddir"
34
	./waf configure --prefix=/usr \
35
		--mandir=/usr/share/man \
Natanael Copa's avatar
Natanael Copa committed
36
		--confdir=/etc/mpv \
37
		--enable-alsa \
38
		--enable-libass \
39
		--enable-libmpv-shared \
40
		--enable-rsound \
41
		--enable-zsh-comp \
42
		|| return 1
43
	./waf build || return 1
44 45 46
}

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

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

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

60 61 62 63 64 65 66 67 68 69
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
}

tmpt's avatar
tmpt committed
70
sha512sums="eefc574e2995ddf6bd15c9b62986a5ca277c30949b036d57a11bbfb796c11c1e6dd7c313abd91a909dd98ca0f2b0be29ec6b980d0287a5891b42b0ffba926cbf  mpv-0.25.0.tar.gz"