aboutsummaryrefslogtreecommitdiffstats
path: root/PKGBUILD
blob: 548781d1e47168f604e5abda67f8e74f9e696210 (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
pkgname=mpv-git
pkgver=0.r38704.f9d2ad6
pkgrel=1

pkgdesc='Video player based on MPlayer/mplayer2 (git version)'
url='http://mpv.io'
arch=('i686' 'x86_64')
license=('GPL')

depends=('portaudio' 'ffmpeg' 'lcms2' 'libdvdread' 'libcdio-paranoia' 'libxinerama'
         'libquvi' 'mpg123' 'libxv' 'libxkbcommon' 'libva' 'lirc-utils'
         'desktop-file-utils' 'hicolor-icon-theme' 'xdg-utils' 'lua51'
         'libxss' 'sdl2' 'smbclient' 'libguess' 'libdvdnav')
makedepends=('mesa' 'python-docutils'  'git')

provides=('mpv')
conflicts=('mpv')

options=(!emptydirs)

install=mpv.install
source=('git+http://github.com/mpv-player/mpv#branch=master')

md5sums=('SKIP')

pkgver() {
	cd mpv
	printf '0.r%s.%s' "$(git rev-list --count HEAD)" "$(git log -1 --pretty=format:%h)"
}

build() {
	CFLAGS="$CFLAGS -I/usr/include/samba-4.0"
	cd mpv
	./bootstrap.py
	./waf configure \
	    --prefix=/usr \
	    --confdir=/etc/mpv \
	    \
	    --disable-cocoa \
	    --disable-coreaudio \
	    --disable-corevideo \
	    --disable-direct3d \
	    --disable-dsound \
	    --disable-gl-win32 \
	    --disable-wasapi \
	    \
	    --disable-libbs2b \
	    --disable-rsound \
	    --disable-sndio \
	    \
	    --enable-sdl2

	./waf build
}

package() {
	CFLAGS="$CFLAGS -I/usr/include/samba-4.0"
	cd mpv
	./waf install --destdir="$pkgdir"

	install -d "$pkgdir"/usr/share/doc/mpv/examples
	install -m644 etc/{input,example}.conf "$pkgdir"/usr/share/doc/mpv/examples
	install -m644 DOCS/{encoding.rst,tech-overview.txt} "$pkgdir"/usr/share/doc/mpv
	install -m755 TOOLS/mpv_identify.sh "$pkgdir"/usr/bin
}