mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 10:32:13 +08:00
69 lines
2.0 KiB
Bash
69 lines
2.0 KiB
Bash
pkgname=mpv
|
|
pkgver=0.9.0
|
|
pkgrel=1
|
|
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' 'libbs2b'
|
|
'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' 'rubberband')
|
|
makedepends=('mesa' 'python3-docutils' 'ladspa' 'x264' 'jack'
|
|
'samba')
|
|
options=('!emptydirs')
|
|
install=${pkgname}.install
|
|
source=("https://github.com/mpv-player/${pkgname}/archive/v${pkgver}.tar.gz")
|
|
sha256sums=('a7afd1438b85e564401feef12f4f8b674df8f511e309c38b03a98928cd03dd22')
|
|
|
|
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 SDL, since they are just legacy drivers
|
|
./waf configure \
|
|
--prefix=/usr \
|
|
--confdir=/etc/mpv \
|
|
--enable-libmpv-shared \
|
|
--enable-cdda \
|
|
--enable-zsh-comp \
|
|
--enable-pulse \
|
|
--disable-sdl2 \
|
|
--disable-sdl1 \
|
|
--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
|
|
}
|