From nobody Fri Nov 5 02:35:03 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E83801832533; Fri, 5 Nov 2021 02:35:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hll3C6K94z4XJ4; Fri, 5 Nov 2021 02:35:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA9CD77F4; Fri, 5 Nov 2021 02:35:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1A52Z3QH043313; Fri, 5 Nov 2021 02:35:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1A52Z3Ot043312; Fri, 5 Nov 2021 02:35:03 GMT (envelope-from git) Date: Fri, 5 Nov 2021 02:35:03 GMT Message-Id: <202111050235.1A52Z3Ot043312@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yasuhiro Kimura Subject: git: 3c0f0ac37fa6 - main - net-p2p/autoscan: Add new port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yasu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c0f0ac37fa62ab2e4abe40fc3cb31eeabd980b7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=3c0f0ac37fa62ab2e4abe40fc3cb31eeabd980b7 commit 3c0f0ac37fa62ab2e4abe40fc3cb31eeabd980b7 Author: Michiel van Baak Jansen AuthorDate: 2021-10-02 19:28:13 +0000 Commit: Yasuhiro Kimura CommitDate: 2021-11-05 02:34:26 +0000 net-p2p/autoscan: Add new port Autoscan replaces the default Plex and Emby behaviour for picking up file changes on the file system. Autoscan integrates with Sonarr, Radarr, Lidarr and Google Drive to fetch changes in near real-time without relying on the file system. PR: 258873 --- GIDs | 2 +- UIDs | 2 +- net-p2p/Makefile | 1 + net-p2p/autoscan/Makefile | 36 +++++++++++++++++++++++ net-p2p/autoscan/distinfo | 3 ++ net-p2p/autoscan/files/autoscan.in | 60 ++++++++++++++++++++++++++++++++++++++ net-p2p/autoscan/pkg-descr | 5 ++++ 7 files changed, 107 insertions(+), 2 deletions(-) diff --git a/GIDs b/GIDs index 035879071152..96183f776323 100644 --- a/GIDs +++ b/GIDs @@ -297,7 +297,7 @@ jackett:*:354: nzbhydra2:*:355: lidarr:*:356: bazarr:*:357: -# free: 358 +autoscan:*:358: # free: 359 v2ray:*:360: httptunnel:*:361: diff --git a/UIDs b/UIDs index 45cbeeddddff..bfff7a569e47 100644 --- a/UIDs +++ b/UIDs @@ -302,7 +302,7 @@ jackett:*:354:354::0:0:Jackett Torznab Proxy Daemon:/nonexistent:/usr/sbin/nolog nzbhydra2:*:355:355::0:0:NZBHydra 2 Daemon:/nonexistent:/usr/sbin/nologin lidarr:*:356:356::0:0:Lidarr Daemon:/nonexistent:/usr/sbin/nologin bazarr:*:357:357::0:0:Bazarr Daemon:/nonexistent:/usr/sbin/nologin -# free: 358 +autoscan:*:358:358::0:0:Autoscan Daemon:/nonexistent:/usr/sbin/nologin # free: 359 v2ray:*:360:360::0:0:V2Ray Daemon:/nonexistent:/usr/sbin/nologin httptunnel:*:361:361::0:0:httptunnel Daemon:/nonexistent:/usr/sbin/nologin diff --git a/net-p2p/Makefile b/net-p2p/Makefile index fca83dad23f1..69e329aedb63 100644 --- a/net-p2p/Makefile +++ b/net-p2p/Makefile @@ -2,6 +2,7 @@ SUBDIR += amule SUBDIR += amule-devel + SUBDIR += autoscan SUBDIR += awgg SUBDIR += bazarr SUBDIR += bazarr-devel diff --git a/net-p2p/autoscan/Makefile b/net-p2p/autoscan/Makefile new file mode 100644 index 000000000000..c8b91e1af522 --- /dev/null +++ b/net-p2p/autoscan/Makefile @@ -0,0 +1,36 @@ +PORTNAME= autoscan +DISTVERSIONPREFIX= v +DISTVERSION= 1.2.0 +CATEGORIES= net-p2p linux +MASTER_SITES= https://github.com/Cloudbox/autoscan/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/ +DISTNAME= ${PORTNAME}_${DISTVERSIONPREFIX}${DISTVERSION}_linux_amd64 +EXTRACT_SUFX= +EXTRACT_ONLY= + +MAINTAINER= michiel@vanbaak.eu +COMMENT= Scan Plex library on webhook triggers + +LICENSE= MIT + +ONLY_FOR_ARCHS= amd64 + +USES= linux +USE_RC_SUBR= autoscan + +CONFLICTS_INSTALL= autoconf-wrapper + +NO_BUILD= yes +SUB_LIST= GROUPS=${GROUPS} \ + USERS=${USERS} + +NO_WRKSUBDIR= yes + +USERS= autoscan +GROUPS= autoscan + +PLIST_FILES= bin/autoscan + +do-install: + ${INSTALL_PROGRAM} ${DISTDIR}/${DISTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + +.include diff --git a/net-p2p/autoscan/distinfo b/net-p2p/autoscan/distinfo new file mode 100644 index 000000000000..f57932bc4a41 --- /dev/null +++ b/net-p2p/autoscan/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1633181844 +SHA256 (autoscan_v1.2.0_linux_amd64) = 3ae59ec61298159e50882ebb8efe159ff8c4da55aa7325afc3f3f603c498e4a3 +SIZE (autoscan_v1.2.0_linux_amd64) = 11227136 diff --git a/net-p2p/autoscan/files/autoscan.in b/net-p2p/autoscan/files/autoscan.in new file mode 100644 index 000000000000..fa895bb4fba4 --- /dev/null +++ b/net-p2p/autoscan/files/autoscan.in @@ -0,0 +1,60 @@ +#!/bin/sh +# +# Author: Michiel van Baak +# +# PROVIDE: autoscan +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable autoscan: +# autoscan_enable: Set to NO by default. Set it to YES to enable it. +# autoscan_user: The user account autoscan daemon runs as what +# you want it to be. Default: autoscan +# autoscan_group: The user group autoscan daemon runs as what +# you want it to be. Default: autoscan +# autoscan_config: Configuration file for autoscan. +# Default: /usr/local/etc/autoscan.yml +# autoscan_datadir: Directory where autoscan user data lives. +# Default: /var/db/autoscan +# autoscan_log: File to write logrecords to +# Default: /var/log/autoscan.log + +. /etc/rc.subr + +name=autoscan +rcvar=autoscan_enable + +load_rc_config ${name} + +: ${autoscan_enable:=NO} +: ${autoscan_user:=%%USERS%%} +: ${autoscan_group:=%%GROUPS%%} +: ${autoscan_config:="%%PREFIX%%/etc/autoscan.yml"} +: ${autoscan_log:="/var/log/autoscan.log"} +: ${autoscan_datadir:="/var/db/autoscan"} + +pidfile="/var/run/${name}/${name}.pid" + +autoscan_command="%%PREFIX%%/bin/autoscan" +autoscan_args="--config=${autoscan_config} --database=${autoscan_datadir}/autoscan.db --log=${autoscan_log}" + +command="/usr/sbin/daemon" +command_args="-P ${pidfile} -r -f ${autoscan_command} ${autoscan_args}" +start_precmd=autoscan_precmd + +autoscan_precmd() +{ + if [ ! -d "/var/run/${name}" ]; then + install -d -m 0750 -o ${autoscan_user} -g ${autoscan_group} "/var/run/${name}" + fi + + if [ ! -d "${autoscan_datadir}" ]; then + install -d -m 0750 -o ${autoscan_user} -g ${autoscan_group} "${autoscan_datadir}" + fi + + if [ ! -f "${autoscan_log}" ]; then + install -m 644 -o ${autoscan_user} -g ${autoscan_group} /dev/null "${autoscan_log}" + fi +} + +run_rc_command "$1" diff --git a/net-p2p/autoscan/pkg-descr b/net-p2p/autoscan/pkg-descr new file mode 100644 index 000000000000..8b0e6ee7bf7a --- /dev/null +++ b/net-p2p/autoscan/pkg-descr @@ -0,0 +1,5 @@ +Autoscan replaces the default Plex and Emby behaviour +for picking up file changes on the file system. + +Autoscan integrates with Sonarr, Radarr, Lidarr and Google Drive +to fetch changes in near real-time without relying on the file system.