64 lines
2.2 KiB
Bash
64 lines
2.2 KiB
Bash
# Maintainer: Giovanni Harting <539@idlegandalf.com>
|
|
# Contributor: Marius Lindvall <(firstname) {cat} varden {dog} info>
|
|
|
|
pkgname=jellyfin-mpv-shim
|
|
pkgver=2.8.0
|
|
pkgrel=1
|
|
pkgdesc='Cast media from Jellyfin Mobile and Web apps to MPV'
|
|
arch=(any)
|
|
url='https://github.com/jellyfin/jellyfin-mpv-shim'
|
|
license=(MIT)
|
|
depends=(mpv 'python>=3.6' python-mpv 'python-mpv-jsonipc>=1.1.9' 'python-jellyfin-apiclient>=1.8.1' tk)
|
|
makedepends=(python-build python-installer python-wheel gettext python-setuptools)
|
|
optdepends=(
|
|
'python-pystray: systray support'
|
|
'python-jinja: display mirroring support'
|
|
'python-pywebview>=3.3.1: display mirroring support'
|
|
'svp: SmoothVideo Project server'
|
|
'mpv-shim-default-shaders: default shader pack'
|
|
'python-pypresence: Discord Rich Presence integration'
|
|
)
|
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
|
|
"shaderpack.patch")
|
|
b2sums=('72eadc434fd09706cd617752487f39686775274ac20b45085aa26490fba6d43d37ec0f6984a91f4001df40e5b31253c17a978f9a9ec8e5ea14bc3ab8015001d9'
|
|
'e44c324eb4fb420a103a8dcbd657976f16cb9d236d8accd4b5276f7f82ecd832dbcf99373659e99082b5b906b1ef3b972a2f87935d5c62e6177b4472b95edba6')
|
|
|
|
|
|
prepare() {
|
|
cd jellyfin-mpv-shim-$pkgver
|
|
|
|
# remove default-shader-pack from packages
|
|
patch -p1 < ../shaderpack.patch
|
|
}
|
|
|
|
build() {
|
|
cd jellyfin-mpv-shim-$pkgver
|
|
|
|
find -iname '*.po' | while read -r _file; do
|
|
msgfmt "$_file" -o "${_file%.*}.mo"
|
|
done
|
|
|
|
python -m build --wheel --no-isolation
|
|
}
|
|
|
|
package() {
|
|
cd jellyfin-mpv-shim-$pkgver
|
|
|
|
install -Dm644 "LICENSE.md" "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
|
|
|
for i in 16 32 48 64 128 256; do
|
|
install -Dvm644 jellyfin_mpv_shim/integration/jellyfin-$i.png "$pkgdir"/usr/share/icons/hicolor/${i}x${i}/apps/com.github.iwalton3.jellyfin-mpv-shim.png
|
|
done
|
|
|
|
install -Dm644 jellyfin_mpv_shim/integration/com.github.iwalton3.jellyfin-mpv-shim.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
|
|
|
|
cd "$pkgdir"
|
|
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
|
|
|
ln -s /usr/share/mpv-shim-default-shaders ${site_packages:1}/jellyfin_mpv_shim/default_shader_pack
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|