git: 22d8cccfd08f - main - net-p2p/bazarr*: new ports for bazarr and bazarr-devel

Tobias C. Berner tcberner at FreeBSD.org
Wed Jul 14 13:53:20 UTC 2021


The branch main has been updated by tcberner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=22d8cccfd08f6f06b9c9b7f6732611d572f622a0

commit 22d8cccfd08f6f06b9c9b7f6732611d572f622a0
Author:     Michiel van Baak Jansen <michiel at vanbaak.eu>
AuthorDate: 2021-04-28 13:20:58 +0000
Commit:     Tobias C. Berner <tcberner at FreeBSD.org>
CommitDate: 2021-07-14 13:52:51 +0000

    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
---
 GIDs                                 |  2 +-
 UIDs                                 |  2 +-
 net-p2p/Makefile                     |  2 ++
 net-p2p/bazarr-devel/Makefile        | 47 ++++++++++++++++++++++++++++++++++++
 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              | 46 +++++++++++++++++++++++++++++++++++
 net-p2p/bazarr/distinfo              |  3 +++
 net-p2p/bazarr/files/bazarr.in       | 42 ++++++++++++++++++++++++++++++++
 net-p2p/bazarr/pkg-descr             |  4 +++
 11 files changed, 195 insertions(+), 2 deletions(-)

diff --git a/GIDs b/GIDs
index f1359bc682d4..154d42473f83 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 815a01dad862..9a414c0df614 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..62ffd042a463
--- /dev/null
+++ b/net-p2p/bazarr-devel/Makefile
@@ -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 at 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>
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 <michiel at 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"
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..a561668d4035
--- /dev/null
+++ b/net-p2p/bazarr/Makefile
@@ -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 at 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>
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 <michiel at 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"
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.


More information about the dev-commits-ports-all mailing list