parlay

yet another gentoo overlay
git clone https://git.parazyd.org/parlay
Log | Files | Refs | README

jellyfin-mpv-shim-2.2.0.ebuild (1864B)


      1 # Copyright 1999-2023 Gentoo Authors
      2 # Distributed under the terms of the GNU General Public License v2
      3 
      4 EAPI=8
      5 
      6 PYTHON_COMPAT=( python3_{8..11} )
      7 inherit distutils-r1 desktop
      8 
      9 DESCRIPTION="MPV Cast Client for Jellyfin"
     10 HOMEPAGE="https://github.com/jellyfin/jellyfin-mpv-shim"
     11 SRC_URI="https://github.com/jellyfin/jellyfin-mpv-shim/archive/v${PV}.tar.gz -> ${P}.tar.gz"
     12 
     13 LICENSE="GPL-3"
     14 SLOT="0"
     15 KEYWORDS="~amd64"
     16 
     17 IUSE="display-mirroring shaders +systray"
     18 
     19 DEPEND="
     20 	media-video/mpv[libmpv]
     21 	>=dev-lang/python-3.6[tk]
     22 	dev-python/requests[${PYTHON_USEDEP}]
     23 	dev-python/python-mpv[${PYTHON_USEDEP}]
     24 	>=dev-python/python-mpv-jsonipc-1.1.9[${PYTHON_USEDEP}]
     25 	>=dev-python/jellyfin-apiclient-python-1.8.1[${PYTHON_USEDEP}]
     26 	systray? (
     27 		dev-python/pystray[${PYTHON_USEDEP}]
     28 		dev-python/pillow[${PYTHON_USEDEP}]
     29 	)
     30 	display-mirroring? (
     31 		dev-python/jinja[${PYTHON_USEDEP}]
     32 		dev-python/pywebview[${PYTHON_USEDEP}]
     33 	)
     34 	shaders? ( media-video/jellyfin-mpv-shim-default-shader-pack )
     35 "
     36 RDEPEND="${DEPEND}"
     37 BDEPEND=""
     38 
     39 shaders_symlink() {
     40 	ln -sv "/usr/share/jellyfin-mpv-shim-default-shader-pack" \
     41 		"${ED}/$(python_get_sitedir)/jellyfin_mpv_shim/default_shader_pack" || die
     42 }
     43 
     44 src_prepare() {
     45 	#move integration dir out of the way
     46 	#so setuptools doesn't install it
     47 	mv ${S}/jellyfin_mpv_shim/integration ${WORKDIR}
     48 
     49 	distutils-r1_src_prepare
     50 }
     51 
     52 src_install() {
     53 	distutils-r1_src_install
     54 
     55 	# Setup symlink to mpv-shim-default-shaders
     56 	if use shaders; then
     57 		python_foreach_impl shaders_symlink
     58 	fi
     59 
     60 	#Install desktop stuff
     61 	pushd ${WORKDIR}/integration
     62 		domenu com.github.iwalton3.jellyfin-mpv-shim.desktop
     63 		for icon in *.png; do
     64 			local size=${icon#jellyfin-*}
     65 			size=${size%*.png}
     66 			newicon --size ${size} ${icon} com.github.iwalton3.jellyfin-mpv-shim.png
     67 		done
     68 		insinto /usr/share/metainfo/
     69 		doins com.github.iwalton3.jellyfin-mpv-shim.appdata.xml
     70 	popd
     71 }