From 8e26e0ca5ba9c14bbb2f16b32d5e6e0b2f3620f3 Mon Sep 17 00:00:00 2001 From: Michiel van Baak Jansen Date: Wed, 28 Apr 2021 15:20:58 +0200 Subject: [PATCH] Add ports for bazarr and bazarr-devel Bazarr is a companion application to Sonarr and Radarr that manages and downloads subtitles based on your requirements. - net-p2p/bazarr uses latest stable release - net-p2p/bazarr-devel uses beta builds (created automatically from development branch once a day, if there were changes to that branch) - Ports dont have bundled dependencies unbundled (yet). Talked this over with upstream, they are not going to unbundle for support-workload avoidance and ease-of-install they get from the fact they bundle all dependencies on specific versions. - Reserve UID and GID for bazarr daemon process - Add to net-p2p/Makefile Website: https://www.bazarr.media Changelog: https://github.com/morpheus65535/bazarr/releases Bugtracker: https://github.com/morpheus65535/bazarr/issues --- GIDs | 2 +- UIDs | 2 +- net-p2p/Makefile | 2 ++ net-p2p/bazarr-devel/Makefile | 50 ++++++++++++++++++++++++++++ net-p2p/bazarr-devel/distinfo | 3 ++ net-p2p/bazarr-devel/files/bazarr.in | 42 +++++++++++++++++++++++ net-p2p/bazarr-devel/pkg-descr | 4 +++ net-p2p/bazarr/Makefile | 48 ++++++++++++++++++++++++++ net-p2p/bazarr/distinfo | 3 ++ net-p2p/bazarr/files/bazarr.in | 42 +++++++++++++++++++++++ net-p2p/bazarr/pkg-descr | 4 +++ 11 files changed, 200 insertions(+), 2 deletions(-) create mode 100644 net-p2p/bazarr-devel/Makefile create mode 100644 net-p2p/bazarr-devel/distinfo create mode 100644 net-p2p/bazarr-devel/files/bazarr.in create mode 100644 net-p2p/bazarr-devel/pkg-descr create mode 100644 net-p2p/bazarr/Makefile create mode 100644 net-p2p/bazarr/distinfo create mode 100644 net-p2p/bazarr/files/bazarr.in create mode 100644 net-p2p/bazarr/pkg-descr diff --git a/GIDs b/GIDs index c88db791479c..7bb5ad77b30a 100644 --- a/GIDs +++ b/GIDs @@ -296,7 +296,7 @@ _iodined:*:353: jackett:*:354: nzbhydra2:*:355: lidarr:*:356: -# free: 357 +bazarr:*:357: # free: 358 # free: 359 v2ray:*:360: diff --git a/UIDs b/UIDs index 8a16d44b933c..ed5400816788 100644 --- a/UIDs +++ b/UIDs @@ -301,7 +301,7 @@ _iodined:*:353:353::0:0:Iodine Daemon:/nonexistent:/usr/sbin/nologin jackett:*:354:354::0:0:Jackett Torznab Proxy Daemon:/nonexistent:/usr/sbin/nologin nzbhydra2:*:355:355::0:0:NZBHydra 2 Daemon:/nonexistent:/usr/sbin/nologin lidarr:*:356:356::0:0:Lidarr Daemon:/nonexistent:/usr/sbin/nologin -# free: 357 +bazarr:*:357:357::0:0:Bazarr Daemon:/nonexistent:/usr/sbin/nologin # free: 358 # free: 359 v2ray:*:360:360::0:0:V2Ray Daemon:/nonexistent:/usr/sbin/nologin diff --git a/net-p2p/Makefile b/net-p2p/Makefile index 7f849ecae71c..031e9a9f762f 100644 --- a/net-p2p/Makefile +++ b/net-p2p/Makefile @@ -3,6 +3,8 @@ SUBDIR += amule SUBDIR += amule-devel SUBDIR += awgg + SUBDIR += bazarr + SUBDIR += bazarr-devel SUBDIR += bitcoin SUBDIR += bitcoin-daemon SUBDIR += bitcoin-utils diff --git a/net-p2p/bazarr-devel/Makefile b/net-p2p/bazarr-devel/Makefile new file mode 100644 index 000000000000..aeb6e793fade --- /dev/null +++ b/net-p2p/bazarr-devel/Makefile @@ -0,0 +1,50 @@ +# $FreeBSD: $ + +PORTNAME= bazarr-devel +DISTVERSIONPREFIX= v +DISTVERSION= 0.9.6-beta.18 +CATEGORIES= net-p2p python +# Grab the asset as it contains built frontend and some extra files +MASTER_SITES= https://github.com/morpheus65535/bazarr/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/ +DISTNAME= bazarr + +MAINTAINER= michiel@vanbaak.eu +COMMENT= Automatic subtitle downloader for Radarr and Sonarr + +LICENSE= GPLv3 + +RUN_DEPENDS= ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}lxml>=4.3.0:devel/py-lxml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}webrtcvad>=2.0.10:audio/py-webrtcvad@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gevent>=21:devel/py-gevent@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gevent-websocket>=0.10.1:www/py-gevent-websocket@${PY_FLAVOR} \ + ffprobe:multimedia/ffmpeg \ + unrar:archivers/unrar + +USES= python:3.7+ zip + +USE_RC_SUBR= bazarr + +NO_ARCH= yes +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \ + USERS=${USERS} + +NO_WRKSUBDIR= yes + +USERS= bazarr +GROUPS= bazarr + +do-build: + @${PYTHON_CMD} -m compileall ${WRKSRC} + @${PYTHON_CMD} -O -m compileall ${WRKSRC} + +do-install: + ${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR} + cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR} + +post-install: + @${FIND} -s ${STAGEDIR} -not -type d | ${SORT} | \ + ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} + +.include diff --git a/net-p2p/bazarr-devel/distinfo b/net-p2p/bazarr-devel/distinfo new file mode 100644 index 000000000000..a42fce937632 --- /dev/null +++ b/net-p2p/bazarr-devel/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1622897366 +SHA256 (bazarr.zip) = 131796084d41e5a30b9ee13fbf786a91953beab6b069a903c0ff52a46e0ffa27 +SIZE (bazarr.zip) = 32894504 diff --git a/net-p2p/bazarr-devel/files/bazarr.in b/net-p2p/bazarr-devel/files/bazarr.in new file mode 100644 index 000000000000..15c226c3d2d0 --- /dev/null +++ b/net-p2p/bazarr-devel/files/bazarr.in @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Author: Michiel van Baak +# +# $FreeBSD: $ +# +# PROVIDE: bazarr +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable bazarr: +# bazarr_enable: Set to NO by default. Set it to YES to enable it. +# bazarr_user: The user account bazarr daemon runs as what +# you want it to be. +# bazarr_datadir: Directory where bazarr user data lives. +# Default: /usr/local/bazarr + +. /etc/rc.subr + +name=bazarr +rcvar=bazarr_enable + +load_rc_config ${name} + +: ${bazarr_enable:=NO} +: ${bazarr_user:=%%USERS%%} +: ${bazarr_datadir:="%%PREFIX%%/bazarr"} + +pidfile="${bazarr_datadir}/bazarr.pid" +procname="%%PYTHON_CMD%%" +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} ${procname} %%DATADIR%%/bazarr.py --no-update -c ${bazarr_datadir}" +start_precmd=bazarr_precmd + +bazarr_precmd() +{ + if [ ! -d ${bazarr_datadir} ]; then + install -d -o ${bazarr_user} ${bazarr_datadir} + fi +} + +run_rc_command "$1" diff --git a/net-p2p/bazarr-devel/pkg-descr b/net-p2p/bazarr-devel/pkg-descr new file mode 100644 index 000000000000..6573ad7b6865 --- /dev/null +++ b/net-p2p/bazarr-devel/pkg-descr @@ -0,0 +1,4 @@ +Bazarr is a companion application to Sonarr and Radarr. +It manages and downloads subtitles based on your requirements. +You define your preferences by TV show or movie +and Bazarr takes care of everything for you. diff --git a/net-p2p/bazarr/Makefile b/net-p2p/bazarr/Makefile new file mode 100644 index 000000000000..7926105c48e6 --- /dev/null +++ b/net-p2p/bazarr/Makefile @@ -0,0 +1,48 @@ +# $FreeBSD: $ + +PORTNAME= bazarr +DISTVERSIONPREFIX= v +DISTVERSION= 0.9.5 +CATEGORIES= net-p2p python +# Grab the asset as it contains built frontend and some extra files +MASTER_SITES= https://github.com/morpheus65535/bazarr/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/ +DISTNAME= bazarr + +MAINTAINER= michiel@vanbaak.eu +COMMENT= Automatic subtitle downloader for Radarr and Sonarr + +LICENSE= GPLv3 + +RUN_DEPENDS= ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}lxml>=4.3.0:devel/py-lxml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}webrtcvad>=2.0.10:audio/py-webrtcvad@${PY_FLAVOR} \ + ffprobe:multimedia/ffmpeg \ + unrar:archivers/unrar + +USES= python:3.7+ zip + +USE_RC_SUBR= bazarr + +NO_ARCH= yes +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \ + USERS=${USERS} + +NO_WRKSUBDIR= yes + +USERS= bazarr +GROUPS= bazarr + +do-build: + @${PYTHON_CMD} -m compileall ${WRKSRC} + @${PYTHON_CMD} -O -m compileall ${WRKSRC} + +do-install: + ${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR} + cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR} + +post-install: + @${FIND} -s ${STAGEDIR} -not -type d | ${SORT} | \ + ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} + +.include diff --git a/net-p2p/bazarr/distinfo b/net-p2p/bazarr/distinfo new file mode 100644 index 000000000000..b14cdb00940e --- /dev/null +++ b/net-p2p/bazarr/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1620486973 +SHA256 (bazarr.zip) = 00607dd56cb426ccede4543173268df514abaca00b6882d612b84e7a3e86ab87 +SIZE (bazarr.zip) = 33225385 diff --git a/net-p2p/bazarr/files/bazarr.in b/net-p2p/bazarr/files/bazarr.in new file mode 100644 index 000000000000..15c226c3d2d0 --- /dev/null +++ b/net-p2p/bazarr/files/bazarr.in @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Author: Michiel van Baak +# +# $FreeBSD: $ +# +# PROVIDE: bazarr +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable bazarr: +# bazarr_enable: Set to NO by default. Set it to YES to enable it. +# bazarr_user: The user account bazarr daemon runs as what +# you want it to be. +# bazarr_datadir: Directory where bazarr user data lives. +# Default: /usr/local/bazarr + +. /etc/rc.subr + +name=bazarr +rcvar=bazarr_enable + +load_rc_config ${name} + +: ${bazarr_enable:=NO} +: ${bazarr_user:=%%USERS%%} +: ${bazarr_datadir:="%%PREFIX%%/bazarr"} + +pidfile="${bazarr_datadir}/bazarr.pid" +procname="%%PYTHON_CMD%%" +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} ${procname} %%DATADIR%%/bazarr.py --no-update -c ${bazarr_datadir}" +start_precmd=bazarr_precmd + +bazarr_precmd() +{ + if [ ! -d ${bazarr_datadir} ]; then + install -d -o ${bazarr_user} ${bazarr_datadir} + fi +} + +run_rc_command "$1" diff --git a/net-p2p/bazarr/pkg-descr b/net-p2p/bazarr/pkg-descr new file mode 100644 index 000000000000..6573ad7b6865 --- /dev/null +++ b/net-p2p/bazarr/pkg-descr @@ -0,0 +1,4 @@ +Bazarr is a companion application to Sonarr and Radarr. +It manages and downloads subtitles based on your requirements. +You define your preferences by TV show or movie +and Bazarr takes care of everything for you. -- 2.31.1