net-p2p/bazarr*: new 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
- The plists are auto-generated as in multimedia/tautulli.

Website: https://www.bazarr.media
Changelog: https://github.com/morpheus65535/bazarr/releases
Bugtracker: https://github.com/morpheus65535/bazarr/issues

PR:		243967
This commit is contained in:
Michiel van Baak Jansen 2021-04-28 15:20:58 +02:00 committed by Tobias C. Berner
parent 40603dcabb
commit 22d8cccfd0
11 changed files with 195 additions and 2 deletions

2
GIDs
View File

@ -296,7 +296,7 @@ _iodined:*:353:
jackett:*:354:
nzbhydra2:*:355:
lidarr:*:356:
# free: 357
bazarr:*:357:
# free: 358
# free: 359
v2ray:*:360:

2
UIDs
View File

@ -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

View File

@ -3,6 +3,8 @@
SUBDIR += amule
SUBDIR += amule-devel
SUBDIR += awgg
SUBDIR += bazarr
SUBDIR += bazarr-devel
SUBDIR += bitcoin
SUBDIR += bitcoin-daemon
SUBDIR += bitcoin-utils

View File

@ -0,0 +1,47 @@
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
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 <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1622897366
SHA256 (bazarr.zip) = 131796084d41e5a30b9ee13fbf786a91953beab6b069a903c0ff52a46e0ffa27
SIZE (bazarr.zip) = 32894504

View File

@ -0,0 +1,42 @@
#!/bin/sh
#
# Author: Michiel van Baak <michiel@vanbaak.eu>
#
# $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"

View File

@ -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.

46
net-p2p/bazarr/Makefile Normal file
View File

@ -0,0 +1,46 @@
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 <bsd.port.mk>

3
net-p2p/bazarr/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1620486973
SHA256 (bazarr.zip) = 00607dd56cb426ccede4543173268df514abaca00b6882d612b84e7a3e86ab87
SIZE (bazarr.zip) = 33225385

View File

@ -0,0 +1,42 @@
#!/bin/sh
#
# Author: Michiel van Baak <michiel@vanbaak.eu>
#
# $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"

4
net-p2p/bazarr/pkg-descr Normal file
View File

@ -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.