desktop/mpv/PKGBUILD
2015-01-28 15:14:17 +00:00

74 lines
2.3 KiB
Bash

# Maintainer: UtG <utg.chakra.linux[at]gmail[dot]com>
# Contributor: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Contributor: Samir Benmendil <ram-z[at]chakra-project[dot]org>
pkgname=mpv
pkgver=0.7.3
pkgrel=2
pkgdesc="A movie player and encoder for linux, based on MPlayer/mplayer2"
arch=('x86_64')
license=('GPL')
url="http://mpv.io"
depends=('pulseaudio' 'ffmpeg' 'lcms2' 'libdvdread' 'libgl'
'libxinerama' 'mpg123' 'libxv' 'libxkbcommon' 'libva' 'libass'
'lirc-utils' 'wayland' 'desktop-file-utils' 'hicolor-icon-theme'
'xdg-utils' 'lua' 'libdvdnav' 'libcdio-paranoia' 'libbluray'
'enca' 'libguess' 'harfbuzz' 'graphite' 'libxrandr')
makedepends=('mesa' 'python3-docutils' 'ladspa' 'x264' 'jack'
'samba' 'sdl2_mixer' 'sdl_mixer' 'libdvdcss' 'libbs2b')
options=('!emptydirs')
install=${pkgname}.install
source=("https://github.com/mpv-player/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('88dcdc44264a8e9b9b73a95d03137d51071aea8c269cc19146109bf8f917e8b1')
prepare() {
# point python to python3
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' ${srcdir}/${pkgname}-${pkgver}/bootstrap.py
# initialize
cd ${pkgname}-${pkgver}
./bootstrap.py
sed -i 's/vendor-completions/site-functions/' wscript_build.py
# waf looking for python2...
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' ${srcdir}/${pkgname}-${pkgver}/waf
}
build() {
cd ${pkgname}-${pkgver}
# disable wayland, as long, as the version is too old
# it won't compile with 1.3.0
./waf configure \
--prefix=/usr \
--confdir=/etc/mpv \
--enable-joystick \
--enable-libmpv-shared \
--enable-cdda \
--enable-zsh-comp \
--enable-pulse \
--enable-sdl2 \
--enable-openal \
--enable-wayland \
--enable-gl-wayland \
--enable-egl-x11 \
--enable-libsmbclient \
--enable-dvdread
./waf build
}
package() {
cd ${pkgname}-${pkgver}
./waf install --destdir="${pkgdir}"
install -d "${pkgdir}/usr/share/doc/mpv/examples"
# some extra useful stuff "make install" doesn't install
install -m755 TOOLS/umpv \
"${pkgdir}"/usr/bin/umpv
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
}