aboutsummaryrefslogblamecommitdiffstats
path: root/community/mpv/APKBUILD
blob: 77505cccf1911fd4e869a05f7f342441dfcc3756 (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.21.0
pkgrel=0
pkgdesc="Video player based on MPlayer/mplayer2"
url="http://mpv.io/"
arch="all"
license="GPL2+"
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 libxrandr-dev"
subpackages="
	$pkgname-doc
	$pkgname-libs
	$pkgname-zsh-completion:zshcomp"
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-xrandr \
		--enable-xss \
		--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"
	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="e0d83a883bc34f67d568c025b036b584  mpv-0.21.0.tar.gz"
sha256sums="d05f8ece859c500ef1649cdfea911ec1529df1898b8fda3e217766dc28dc9bd3  mpv-0.21.0.tar.gz"
sha512sums="f4072fc3a351643f94c64c8da43560458d53072e61d099670903319f21576ccbdfa053a57c1ac09fe51e067e5055e1bb691ee93645ea2dea04b95fd96d937d16  mpv-0.21.0.tar.gz"