Skip to content

Commit

Permalink
tvheadend: Migrate to python310
Browse files Browse the repository at this point in the history
  • Loading branch information
th0ma7 committed Dec 7, 2021
1 parent 9931d7a commit f6bfbc0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 24 deletions.
12 changes: 6 additions & 6 deletions spk/tvheadend/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
SPK_NAME = tvheadend
SPK_SHORT_VERS = 4.3
SPK_GIT_HASH = c6bb43d
SPK_GIT_DATE = 20211020
SPK_GIT_HASH = b871020
SPK_GIT_DATE = 20211121
SPK_VERS = $(SPK_SHORT_VERS).$(SPK_GIT_DATE)
TVH_VERS = $(SPK_SHORT_VERS)~$(SPK_GIT_HASH)
SPK_REV = 30
SPK_REV = 31
SPK_ICON = src/tvheadend.png
DSM_UI_DIR = app

Expand All @@ -13,8 +13,8 @@ DSM_UI_DIR = app
# 000-fix-version.patch from cross/tvheadend
export TVH_VERS

SPK_DEPENDS = "python38"
WHEELS = src/requirements.txt
SPK_DEPENDS = "python310"
WHEELS = src/requirements-pure.txt

DEPENDS = cross/$(SPK_NAME) cross/zap2epg cross/dtv-scan-tables

Expand All @@ -24,7 +24,7 @@ DESCRIPTION_FRE = Tvheadend est un serveur de streaming et enregistreur TV pour
RELOAD_UI = yes
DISPLAY_NAME = Tvheadend
STARTABLE = yes
CHANGELOG = "1. Update to latest git version c6bb43d as of June 20th 2021<br/>2. Update openssl to 1.1<br/>3. Updated to use FFMPEG 4.3.3<br/>4. Updated libhdhomerun to version 20210624"
CHANGELOG = "1. Update to latest git version b871020 as of November 21th 2021<br/>2. Update openssl to 1.1l<br/>3. Updated to use FFMPEG 4.3.3<br/>4. Updated libhdhomerun to version 20210624<br/>5. Update to Python 3.10<br/>6. Update pngquant to version 2.17.0<br/>7. Update readline to version 8.1"
HOMEPAGE = https://tvheadend.org/
LICENSE = GPL v3

Expand Down
2 changes: 1 addition & 1 deletion spk/tvheadend/src/requirements-pure.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
certifi==2021.5.30
#certifi==2021.5.30 ==> python310
chardet==4.0.0
requests==2.25.1
urllib3==1.26.5
27 changes: 10 additions & 17 deletions spk/tvheadend/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# Package specific behaviors
# Sourced script by generic installer and start-stop-status scripts

# Add ffmpeg and ifself to path
PYTHON_DIR="/var/packages/python38/target"
PYTHONENV="${SYNOPKG_PKGDEST}/env"
VIRTUALENV="${PYTHON_DIR}/bin/virtualenv"
WHEELHOUSE=${SYNOPKG_PKGDEST}/share/wheelhouse
FFMPEG_DIR="/var/packages/ffmpeg/target"
PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${FFMPEG_DIR}/bin:${PYTHON_DIR}/bin:${PATH}"
# Define python310 binary path
PYTHON_DIR="/var/packages/python310/target/bin"
# Define ffmpeg binary path
FFMPEG_DIR="/var/packages/ffmpeg/target/bin"
# Add local bin, virtualenv along with ffmpeg and python310 to the default PATH
PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${PYTHON_DIR}:${FFMPEG_DIR}:${PATH}"

# Service configuration. Change http and htsp ports here and in conf/tvheadend.sc for non-standard ports
HTTP=9981
Expand All @@ -16,7 +12,7 @@ HTSP=9982
# Replace generic service startup, run service in background
GRPN=$(id -gn ${EFF_USER})
UPGRADE_CFG_DIR="${SYNOPKG_PKGVAR}/dvr/config"
SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/tvheadend -f -C -u ${EFF_USER} -g ${GRPN} --http_port ${HTTP} --htsp_port ${HTSP} -c ${SYNOPKG_PKGVAR} -p ${PID_FILE} -l ${LOG_FILE} --debug \"\""
SERVICE_COMMAND="tvheadend -f -C -u ${EFF_USER} -g ${GRPN} --http_port ${HTTP} --htsp_port ${HTSP} -c ${SYNOPKG_PKGVAR} -p ${PID_FILE} -l ${LOG_FILE} --debug \"\""
SVC_BACKGROUND=yes

# Group configuration to manage permissions of recording folders
Expand All @@ -25,13 +21,10 @@ GROUP=sc-media
service_postinst ()
{
# EPG Grabber (zap2epg) - Create a Python virtualenv
${VIRTUALENV} --system-site-packages ${PYTHONENV}
install_python_virtualenv

# EPG Grabber (zap2epg) - Install the wheels/requirements
${SYNOPKG_PKGDEST}/env/bin/pip install \
--no-deps --no-index --no-input --upgrade \
--force-reinstall --find-links \
${WHEELHOUSE} ${WHEELHOUSE}/*.whl
# EPG Grabber (zap2epg) - Install the Python wheels
install_python_wheels
}

service_postupgrade ()
Expand Down

0 comments on commit f6bfbc0

Please sign in to comment.