105 lines
4.2 KiB
Bash
105 lines
4.2 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgname=mpv
|
|
epoch=1
|
|
pkgver=0.38.0
|
|
pkgrel=06
|
|
pkgdesc='a free, open source, and cross-platform media player - alsa no-pipew'
|
|
url='https://mpv.io/'
|
|
depends=('alsa-lib' 'libasound.so' 'desktop-file-utils' 'ffmpeg' 'libavcodec.so' 'libavdevice.so'
|
|
'libavfilter.so' 'libavformat.so' 'libavutil.so' 'libswresample.so' 'libswscale.so'
|
|
'glibc' 'hicolor-icon-theme' 'jack' 'libjack.so' 'lcms2' 'liblcms2.so' 'libarchive'
|
|
'libarchive.so' 'libass' 'libass.so' 'libbluray' 'libbluray.so' 'libcdio'
|
|
'libcdio-paranoia' 'libdrm' 'libdvdnav' 'libdvdread' 'libegl' 'libgl' 'libglvnd'
|
|
'libjpeg' 'libjpeg.so' 'libplacebo' 'libplacebo.so' 'libpulse' 'libpulse.so' 'libsixel'
|
|
'libva' 'libva.so' 'libva-drm.so' 'libva-wayland.so' 'libva-x11.so' 'libvdpau' 'libx11'
|
|
'libxext' 'libxkbcommon' 'libxkbcommon.so' 'libxpresent' 'libxrandr' 'libxss'
|
|
'libxv' 'luajit' 'mesa' 'mujs' 'rubberband' 'librubberband.so'
|
|
'openal' 'uchardet' 'vapoursynth' 'vulkan-icd-loader' 'wayland' 'zlib')
|
|
makedepends=('git' 'meson' 'python-docutils' 'ladspa' 'wayland-protocols'
|
|
'ffnvcodec-headers' 'vulkan-headers')
|
|
optdepends=('yt-dlp: for video-sharing websites playback'
|
|
'youtube-dl: for video-sharing websites playback')
|
|
provides=('libmpv.so')
|
|
conflicts=(mpv-git)
|
|
#options=('debug' '!emptydirs') ## uncomment this line to have the debug pkg produced
|
|
options=('!emptydirs')
|
|
#install=mpv.install
|
|
#_tag='807b9343ef911d138950411cdb83c16a151d2018' # git rev-parse v${pkgver}
|
|
#source=("git+https://github.com/mpv-player/mpv.git#tag=${_tag}?signed")
|
|
source=("git+https://github.com/mpv-player/mpv.git#tag=v${pkgver}?signed"
|
|
"dynamically_generate_desktop_file_protocols.patch")
|
|
|
|
prepare() {
|
|
cd "${pkgname}"
|
|
# Patch to dynamically generate protocols in the mpv.desktop file
|
|
# Taken from https://github.com/mpv-player/mpv/pull/14145
|
|
# Fixes:
|
|
# - https://github.com/mpv-player/mpv/issues/8731
|
|
# - https://github.com/mpv-player/mpv/issues/14124
|
|
# - https://gitlab.archlinux.org/archlinux/packaging/packages/mpv/-/issues/10
|
|
patch -Np1 < "${srcdir}/dynamically_generate_desktop_file_protocols.patch"
|
|
}
|
|
|
|
build() {
|
|
local _meson_options=(
|
|
--auto-features auto
|
|
|
|
-Dlibmpv=true
|
|
-Dpipewire=disabled
|
|
-Dgl-x11=enabled
|
|
-Dcaca=disabled
|
|
-Dcdda=enabled
|
|
-Ddvbin=enabled
|
|
-Ddvdnav=enabled
|
|
-Dlibarchive=enabled
|
|
-Dopenal=enabled
|
|
)
|
|
|
|
arch-meson "${pkgname}" build "${_meson_options[@]}"
|
|
|
|
meson compile -C build
|
|
}
|
|
|
|
check() {
|
|
meson test -C build
|
|
}
|
|
|
|
package() {
|
|
meson install -C build --destdir "${pkgdir}"
|
|
|
|
# delete private entries only required for static linking
|
|
sed -i -e '/Requires.private/d' -e '/Libs.private/d' "${pkgdir}"/usr/lib/pkgconfig/mpv.pc
|
|
|
|
install -m0644 "${pkgname}"/DOCS/{encoding.rst,tech-overview.txt} \
|
|
"${pkgdir}"/usr/share/doc/mpv
|
|
|
|
install -m0644 "${pkgname}"/TOOLS/{umpv,mpv_identify.sh,stats-conv.py,idet.sh,lua/*} \
|
|
-D -t "${pkgdir}"/usr/share/mpv/scripts
|
|
}
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=('GPL-2.0-or-later AND LGPL-2.1-or-later')
|
|
|
|
validpgpkeys=('145077D82501AA20152CACCE8D769208D5E31419') # sfan5 <sfan5@live.de>
|
|
|
|
# validpgpkeys=('145077D82501AA20152CACCE8D769208D5E31419') # sfan5 <sfan5@live.de> # not to be used with git
|
|
# # only with signed releases
|
|
|
|
sha256sums=(b37b91d0ae4518594b22338ebe979f13bdc56b6fa26d589e5c3f7b96a31bab3d # mpv
|
|
88acf97cbc8e0fe745f09bd0bd7f65e0437adcb549dadf3588fd0724d01298e9) # dynamically_generate_desktop_file_protocols.patch
|
|
|
|
# Note to packager:
|
|
#ls -l *pkg.tar.lz
|
|
#echo "you must rename this package to meet SF naming before you move to the repo"
|
|
#mv $(ls -l $pkgname*pkg.tar.lz) $pkgname-$epoch_$pkgver-$pkgrel-$arch.pkg.tar.lz >pkg-mv.log
|
|
|
|
## e47e12f54ccc7d69e10ebae7112e1fea25843b1c863444ad2a5aab5d92e05df5 mpv-1_0.38.0-06-x86_64.pkg.tar.lz
|