python-jellyfin-apiclient

Python API client for Jellyfin

runtime dedependencies python (Interpreter languages and scripting)
python-certifi (Interpreter languages and scripting/External python modules)
python-requests (Interpreter languages and scripting/External python modules)
python-six (Interpreter languages and scripting/External python modules)
python-urllib3 (Interpreter languages and scripting/External python modules)
python-websocket-client (Interpreter languages and scripting/External python modules)
mkdir /data/buildroot/package/python-jellyfin-apiclient
echo "sha256  b765e667baecad9abde37973443aeacec63f76314d8c56e4118787780d805622 jellyfin-apiclient-python-1.8.1.tar.gz" > /data/buildroot/package/python-jellyfin-apiclient/python-jellyfin-apiclient.hash
cat > /data/buildroot/package/python-jellyfin-apiclient/Config.in << 'EOF'
config BR2_PACKAGE_PYTHON_JELLYFIN_APICLIENT
        bool "python-jellyfin-apiclient"
        depends on BR2_PACKAGE_PYTHON_SETUPTOOLS
        depends on BR2_PACKAGE_PYTHON_REQUESTS
        depends on BR2_PACKAGE_PYTHON_URLLIB3
        depends on BR2_PACKAGE_PYTHON_WEBSOCKET_CLIENT
        depends on BR2_PACKAGE_PYTHON_SIX
        depends on BR2_PACKAGE_PYTHON_CERTIFI
        select BR2_PACKAGE_GETTEXT_TINY
        help
          Python API client for Jellyfin
EOF

cat > /data/buildroot/package/python-jellyfin-apiclient/python-jellyfin-apiclient.mk << 'EOF'
#############################################################
#
# python-jellyfin-apiclient
#
#############################################################

PYTHON_JELLYFIN_APICLIENT_VERSION = 1.8.1
PYTHON_JELLYFIN_APICLIENT_SOURCE  = jellyfin-apiclient-python-$(PYTHON_JELLYFIN_APICLIENT_VERSION).tar.gz
PYTHON_JELLYFIN_APICLIENT_SITE    = https://pypi.python.org/packages/source/j/jellyfin-apiclient-python

PYTHON_JELLYFIN_APICLIENT_DEPENDENCIES = python-setuptools python-requests python-urllib3 python-websocket-client python-six python-certifi

define PYTHON_JELLYFIN_APICLIENT_BUILD_CMDS
    cd $(@D)/ && \
    PYTHONPATH="$(TARGET_DIR)/usr/lib/$(ls $TARGET_DIR/usr/lib/ | grep python)/site-packages" \
    $(HOST_DIR)/usr/bin/python setup.py build
endef

define PYTHON_JELLYFIN_APICLIENT_INSTALL_TARGET_CMDS
    cd $(@D)/ && \
    PYTHONPATH="$(TARGET_DIR)/usr/lib/$(ls $TARGET_DIR/usr/lib/ | grep python)/site-packages" \
    $(HOST_DIR)/usr/bin/python setup.py install --prefix="$(TARGET_DIR)/usr" --optimize=1 --skip-build
endef

$(eval $(generic-package))
EOF

sed -i '/menu "Custom packages"/a source "package/python-jellyfin-apiclient/Config.in"' /data/buildroot/package/Config.in

```