desktop/mpv/PKGBUILD

72 lines
2.1 KiB
Bash
Raw Normal View History

2014-02-03 17:59:56 +08:00
pkgname=mpv
2015-12-12 07:18:30 +08:00
pkgver=0.14.0
pkgrel=4
2014-02-03 17:59:56 +08:00
pkgdesc="A movie player and encoder for linux, based on MPlayer/mplayer2"
arch=('x86_64')
license=('LGPL3')
2014-02-03 17:59:56 +08:00
url="http://mpv.io"
depends=('pulseaudio' 'ffmpeg' 'lcms2' 'libdvdread' 'libgl' 'libvdpau'
2015-10-29 22:11:01 +08:00
'libxinerama' 'libxv' 'libxkbcommon' 'libva' 'libass' 'uchardet'
'wayland' 'desktop-file-utils' 'hicolor-icon-theme' 'v4l-utils'
'xdg-utils' 'lua' 'libdvdnav' 'libcdio-paranoia' 'libbluray' 'libxss'
'enca' 'libguess' 'harfbuzz' 'graphite' 'libxrandr' 'rubberband' 'smbclient')
2015-01-28 23:14:17 +08:00
makedepends=('mesa' 'python3-docutils' 'ladspa' 'x264' 'jack'
'samba')
2015-01-28 23:14:17 +08:00
options=('!emptydirs')
provides=('mplayer')
2014-02-03 17:59:56 +08:00
install=${pkgname}.install
2014-07-16 03:40:57 +08:00
source=("https://github.com/mpv-player/${pkgname}/archive/v${pkgver}.tar.gz")
2015-12-12 07:18:30 +08:00
sha256sums=('042937f483603f0c3d1dec11e8f0045e8c27f19eee46ea64d81a3cdf01e51233')
2014-04-24 05:29:56 +08:00
prepare() {
2014-10-31 01:53:07 +08:00
# point python to python3
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' ${srcdir}/${pkgname}-${pkgver}/bootstrap.py
# initialize
2014-07-16 03:40:57 +08:00
cd ${pkgname}-${pkgver}
2014-04-24 05:29:56 +08:00
./bootstrap.py
2014-07-16 03:40:57 +08:00
sed -i 's/vendor-completions/site-functions/' wscript_build.py
2014-10-31 01:53:07 +08:00
# waf looking for python2...
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' ${srcdir}/${pkgname}-${pkgver}/waf
2014-04-24 05:29:56 +08:00
}
2014-02-03 17:59:56 +08:00
build() {
2014-07-16 03:40:57 +08:00
cd ${pkgname}-${pkgver}
2014-02-03 17:59:56 +08:00
2015-02-27 14:05:25 +08:00
# disable SDL, since they are just legacy drivers
2014-07-16 03:40:57 +08:00
./waf configure \
--prefix=/usr \
--confdir=/etc/mpv \
--enable-libmpv-shared \
--enable-cdda \
--enable-zsh-comp \
2015-10-29 22:11:01 +08:00
--enable-alsa \
2014-07-16 03:40:57 +08:00
--enable-pulse \
2015-01-28 23:14:17 +08:00
--enable-openal \
2015-01-28 17:14:38 +08:00
--enable-wayland \
--enable-gl-wayland \
2015-01-28 23:14:17 +08:00
--enable-egl-x11 \
--enable-libsmbclient \
2015-10-29 22:11:01 +08:00
--enable-dvdread \
--enable-libv4l2 \
--enable-vdpau \
--enable-gpl3
2014-04-24 05:29:56 +08:00
./waf build
2014-02-03 17:59:56 +08:00
}
package() {
2014-07-16 03:40:57 +08:00
cd ${pkgname}-${pkgver}
2014-02-03 17:59:56 +08:00
2014-07-16 03:40:57 +08:00
./waf install --destdir="${pkgdir}"
2014-02-03 17:59:56 +08:00
2014-07-16 03:40:57 +08:00
install -d "${pkgdir}/usr/share/doc/mpv/examples"
2014-02-03 17:59:56 +08:00
# some extra useful stuff "make install" doesn't install
2014-10-05 10:00:34 +08:00
install -m755 TOOLS/umpv \
"${pkgdir}"/usr/bin/umpv
2014-04-24 05:29:56 +08:00
install -m644 etc/{input,example}.conf \
2014-07-16 03:40:57 +08:00
"${pkgdir}"/usr/share/doc/mpv/examples
2014-04-24 05:29:56 +08:00
install -m644 DOCS/{encoding.rst,tech-overview.txt} \
2014-07-16 03:40:57 +08:00
"${pkgdir}"/usr/share/doc/mpv
2014-02-03 17:59:56 +08:00
}