aboutsummaryrefslogblamecommitdiffstats
path: root/community/mpv/APKBUILD
blob: 6d9cc02e4dbaad308d5e1a5c1979c8b178811567 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                              
                                                   


                                                    

             

                                                
          
             
          

                                                                    
                                                                       
                                                                          
                                                             
          



                                        
                                                                                          
         


                               





                                                                        

                                  



                       
                                       
                                         
                                    
                                        
                                 
                                   
                              
                                 
                           
                               



                       
                                                     







                                                                      
                                                          
                                                     

                                                                 

 










                                                                     


                                                                                                                                                                
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpv
pkgver=0.14.0
pkgrel=0
pkgdesc="Video player based on MPlayer/mplayer2"
url="http://mpv.io/"
arch="all"
license="GPL"
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 python
	libxext-dev libxscrnsaver-dev py-docutils rsound-dev"
install=""
subpackages="
	$pkgname-doc
	$pkgname-libs
	$pkgname-zsh-completion:zshcomp"
source="$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/mpv/archive/v$pkgver.tar.gz
	"

_builddir="$srcdir"/mpv-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	./bootstrap.py || return 1
}

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

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

	local file=
	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	for file in "$_builddir"/DOCS/*.rst "$_builddir"/DOCS/*.md; do
		install -Dm644 "$file" \
			"$pkgdir"/usr/share/doc/$pkgname || return 1
	done

	# 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"
	arch="noarch"

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

md5sums="9f78599b52d9e603f2481d36746ddd0c  mpv-0.14.0.tar.gz"
sha256sums="042937f483603f0c3d1dec11e8f0045e8c27f19eee46ea64d81a3cdf01e51233  mpv-0.14.0.tar.gz"
sha512sums="523bffe87d6743ac67cab090bb5f43363352491f663debf150e204b942daaaa85176f228011e306d58fa4a05ee962d4bc56b6f77ea943e3efe757417ad52b952  mpv-0.14.0.tar.gz"