PKGBUILDs/community/mpv/PKGBUILD
2018-05-12 16:54:00 +00:00

70 lines
2 KiB
Bash

# $Id$
# Maintainer: Christian Hesse <mail@eworm.de>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Eivind Uggedal <eivind@uggedal.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - armv7/aarch64 needs to be built with fPIC
# - disable retarded rpi detection
pkgname=mpv
epoch=1
pkgver=0.28.2
pkgrel=1
_waf_version=1.9.8
pkgdesc='a free, open source, and cross-platform media player'
arch=('x86_64')
# We link against libraries that are licensed GPLv3 explicitly, libsmbclient
# being one of these. So our package is GPLv3 only as well.
license=('GPL3')
url='https://mpv.io/'
depends=(
'ffmpeg' 'lcms2' 'libcdio-paranoia' 'libgl' 'libxss'
'libxinerama' 'libxv' 'libxkbcommon' 'libva' 'wayland' 'libcaca'
'desktop-file-utils' 'hicolor-icon-theme' 'xdg-utils' 'lua52' 'libdvdnav'
'libxrandr' 'jack' 'rubberband' 'uchardet' 'libarchive' 'smbclient'
)
makedepends=('mesa' 'python-docutils' 'ladspa')
optdepends=('youtube-dl: for video-sharing websites playback')
options=('!emptydirs')
source=("$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/$pkgname/archive/v$pkgver.tar.gz"
"https://waf.io/waf-${_waf_version}")
sha256sums=('aada14e025317b5b3e8e58ffaf7902e8b6e4ec347a93d25a7c10d3579426d795'
'167dc42bab6d5bd823b798af195420319cb5c9b571e00db7d83df2a0fe1f4dbf')
prepare() {
cd ${pkgname}-${pkgver}
install -m755 "${srcdir}"/waf-${_waf_version} waf
}
build() {
cd ${pkgname}-${pkgver}
[[ $CARCH == "armv7h" || $CARCH == "aarch64" ]] && CFLAGS+=" -fPIC" && CXXFLAGS+=" -fPIC"
./waf configure --prefix=/usr \
--confdir=/etc/mpv \
--enable-cdda \
--enable-dvb \
--enable-dvdnav \
--enable-encoding \
--enable-libsmbclient \
--enable-libarchive \
--enable-libmpv-shared \
--enable-zsh-comp \
--enable-egl-x11 \
--disable-rpi
./waf build
}
package() {
cd ${pkgname}-${pkgver}
./waf install --destdir="$pkgdir"
install -m644 DOCS/{encoding.rst,tech-overview.txt} \
"$pkgdir"/usr/share/doc/mpv
}