diff --git a/cross/tvheadend/PLIST b/cross/tvheadend/PLIST index a9c77cf4632..7046f82398b 100644 --- a/cross/tvheadend/PLIST +++ b/cross/tvheadend/PLIST @@ -1,3 +1,6 @@ bin:bin/tvheadend +rsc:bin/tvhmeta +rsc:bin/tv_meta_tmdb.py +rsc:bin/tv_meta_tvdb.py rsc:share/tvheadend rsc:share/fontconfig diff --git a/cross/zap2epg/Makefile b/cross/zap2epg/Makefile new file mode 100644 index 00000000000..631101de04d --- /dev/null +++ b/cross/zap2epg/Makefile @@ -0,0 +1,26 @@ +PKG_NAME = zap2epg +PKG_VERS = 3.0 +PKG_EXT = tar.gz +#PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT) +PKG_DIST_NAME = Python3-th0ma7-updates.$(PKG_EXT) +PKG_DIST_SITE = https://github.com/daniel-widrick/zap2it-GuideScraping/archive +PKG_DIST_SITE = https://github.com/th0ma7/script.module.zap2epg/archive +PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) +PKG_DIR = script.module.zap2epg-Python3-th0ma7-updates + +DEPENDS = + +HOMEPAGE = https://github.com/edit4ever/script.module.zap2epg +COMMENT = zap2epg will generate an xmltv.xml file for USA/Canada TV lineups using zap2it source +LICENSE = GPLv3 + +INSTALL_TARGET = zap2it_install + +include ../../mk/spksrc.install-resources.mk + +.PHONY: zap2it_install +zap2it_install: + install -m 755 -d $(STAGING_INSTALL_PREFIX)/bin + install -m 755 $(WORK_DIR)/$(PKG_DIR)/tv_grab_zap2epg $(STAGING_INSTALL_PREFIX)/bin + install -m 750 -d $(STAGING_INSTALL_PREFIX)/var/epggrab/conf + install -m 640 $(WORK_DIR)/$(PKG_DIR)/epggrab/conf/zap2epg.xml $(STAGING_INSTALL_PREFIX)/var/epggrab/conf diff --git a/cross/zap2epg/PLIST b/cross/zap2epg/PLIST new file mode 100644 index 00000000000..6e27d45e428 --- /dev/null +++ b/cross/zap2epg/PLIST @@ -0,0 +1,2 @@ +rsc:bin/tv_grab_zap2epg +rsc:var/epggrab/conf/zap2epg.xml diff --git a/cross/zap2epg/digests b/cross/zap2epg/digests new file mode 100644 index 00000000000..1891d0740b2 --- /dev/null +++ b/cross/zap2epg/digests @@ -0,0 +1,3 @@ +zap2epg-3.0.tar.gz SHA1 6dbdef7a0459f151cfb06b043a5aa027af9c2011 +zap2epg-3.0.tar.gz SHA256 fefb724bcd8f460af50f56085a92db88ed839609f5c38b83e42fe8526aa5c7e7 +zap2epg-3.0.tar.gz MD5 a6a59af402b5b5fb6d5e60067a2e2b0a diff --git a/spk/tvheadend/Makefile b/spk/tvheadend/Makefile index cbc54e163e8..ada1b451cf0 100644 --- a/spk/tvheadend/Makefile +++ b/spk/tvheadend/Makefile @@ -13,7 +13,9 @@ DSM_UI_DIR = app # 000-fix-version.patch from cross/tvheadend export TVH_VERS -DEPENDS = cross/$(SPK_NAME) +DEPENDS = cross/$(SPK_NAME) cross/zap2epg +WHEELS = src/requirements.txt +SPK_DEPENDS = "python38" MAINTAINER = th0ma7 DESCRIPTION = Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT IP and HDHomeRun as input sources. Tvheadend offers HTTP, HTSP and SAT IP streaming. diff --git a/spk/tvheadend/PLIST b/spk/tvheadend/PLIST index e69de29bb2d..4cfaf73a12c 100644 --- a/spk/tvheadend/PLIST +++ b/spk/tvheadend/PLIST @@ -0,0 +1 @@ +rsc:share/wheelhouse diff --git a/spk/tvheadend/src/requirements.txt b/spk/tvheadend/src/requirements.txt new file mode 100644 index 00000000000..84b557c9ea3 --- /dev/null +++ b/spk/tvheadend/src/requirements.txt @@ -0,0 +1,4 @@ +certifi==2021.5.30 +chardet==4.0.0 +requests==2.25.1 +urllib3==1.26.5 diff --git a/spk/tvheadend/src/service-setup.sh b/spk/tvheadend/src/service-setup.sh index 32ce438c1a6..e19a7f07436 100644 --- a/spk/tvheadend/src/service-setup.sh +++ b/spk/tvheadend/src/service-setup.sh @@ -1,6 +1,14 @@ # 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}" + # Service configuration. Change http and htsp ports here and in conf/tvheadend.sc for non-standard ports HTTP=9981 HTSP=9982 @@ -21,6 +29,15 @@ service_postinst () # Edit the password configuration according to the wizard sed -i -e "s/@password@/${wizard_password}/g" ${SYNOPKG_PKGVAR}/passwd/a927e30a755504f9784f23a4efac5109 + + # EPG Grabber (zap2epg) - Create a Python virtualenv + ${VIRTUALENV} --system-site-packages ${PYTHONENV} + + # 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 } service_preupgrade ()