diff options
Diffstat (limited to 'archivers/unpackerr')
-rw-r--r-- | archivers/unpackerr/Makefile | 43 | ||||
-rw-r--r-- | archivers/unpackerr/distinfo | 5 | ||||
-rw-r--r-- | archivers/unpackerr/files/unpackerr.in | 49 | ||||
-rw-r--r-- | archivers/unpackerr/pkg-descr | 5 |
4 files changed, 102 insertions, 0 deletions
diff --git a/archivers/unpackerr/Makefile b/archivers/unpackerr/Makefile new file mode 100644 index 000000000000..489b0bf67f48 --- /dev/null +++ b/archivers/unpackerr/Makefile @@ -0,0 +1,43 @@ +PORTNAME= unpackerr +DISTVERSIONPREFIX= v +DISTVERSION= 0.14.5 +CATEGORIES= archivers + +MAINTAINER= mdw@FreeBSD.org +COMMENT= Extracts downloads for Radarr, Sonarr, Lidarr or Readarr +WWW= https://unpackerr.zip + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= go-md2man:textproc/go-md2man + +USES= go:modules +USE_RC_SUBR= unpackerr + +GO_MODULE= github.com/Unpackerr/unpackerr + +USERS= unpackerr +GROUPS= unpackerr + +PLIST_FILES= bin/${PORTNAME} \ + share/man/man1/unpackerr.1.gz \ + "@sample ${ETCDIR_REL}/unpackerr.conf.sample" +PORTDOCS= README.md + +OPTIONS_DEFINE= DOCS + +post-build: + go-md2man -in ${WRKSRC}/examples/MANUAL.md -out ${WRKSRC}/examples/unpackerr.1 + ${GZIP_CMD} ${WRKSRC}/examples/unpackerr.1 + +post-install: + ${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/unpackerr.conf.example ${STAGEDIR}${ETCDIR}/unpackerr.conf.sample + ${INSTALL_MAN} ${WRKSRC}/examples/unpackerr.1.gz ${STAGEDIR}${PREFIX}/share/man/man1/ + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}/ + +.include <bsd.port.mk> diff --git a/archivers/unpackerr/distinfo b/archivers/unpackerr/distinfo new file mode 100644 index 000000000000..f859e97acd3c --- /dev/null +++ b/archivers/unpackerr/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1759263836 +SHA256 (go/archivers_unpackerr/unpackerr-v0.14.5/v0.14.5.mod) = 398c880324fd0261e639105a31d5149a8e92457454aac443e511a321a5b24cf8 +SIZE (go/archivers_unpackerr/unpackerr-v0.14.5/v0.14.5.mod) = 3148 +SHA256 (go/archivers_unpackerr/unpackerr-v0.14.5/v0.14.5.zip) = 25c7d38d3a70f3171076bef30980b8da783dc8cf049f0ddd2830f3045516f7d2 +SIZE (go/archivers_unpackerr/unpackerr-v0.14.5/v0.14.5.zip) = 655980 diff --git a/archivers/unpackerr/files/unpackerr.in b/archivers/unpackerr/files/unpackerr.in new file mode 100644 index 000000000000..af63a6d0cf09 --- /dev/null +++ b/archivers/unpackerr/files/unpackerr.in @@ -0,0 +1,49 @@ +#!/bin/sh + +# PROVIDE: unpackerr +# REQUIRE: LOGIN NETWORKING +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable unpackerr: +# unpackerr_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable unpackerr +# unpackerr_configfile (str): Set to "%%PREFIX%%/etc/unpackerr.conf" by default. +# Configuration file for unpackerr +# unpackerr_user (str): Set to "unpackerr" by default. +# User to run unpackerr + +. /etc/rc.subr + +name=unpackerr +rcvar=unpackerr_enable + +start_precmd="${name}_precmd" +stop_postcmd="${name}_postcmd" +configtest_cmd="${name}_configtest" + +load_rc_config ${name} + +: ${unpackerr_enable:="no"} +: ${unpackerr_configfile:="%%PREFIX%%/etc/unpackerr/unpackerr.conf"} +: ${unpackerr_user:="unpackerr"} + +procname="%%PREFIX%%/bin/unpackerr" +pidfile="/var/run/${name}.pid" +daemonpidfile="/var/run/daemon_${name}.pid" +required_files="${unpackerr_configfile}" +command="/usr/sbin/daemon" + +unpackerr_precmd() +{ + rc_flags="-p ${pidfile} -P ${daemonpidfile} -f ${procname} -c ${unpackerr_configfile} ${rc_flags}" + + /usr/bin/install -m 600 -o ${unpackerr_user} /dev/null $pidfile + /usr/bin/install -m 600 -o ${unpackerr_user} /dev/null $daemonpidfile +} + +unpackerr_postcmd() +{ + rm -f $pidfile $daemonpidfile +} + +run_rc_command "$1" diff --git a/archivers/unpackerr/pkg-descr b/archivers/unpackerr/pkg-descr new file mode 100644 index 000000000000..6cd65d9f8ab1 --- /dev/null +++ b/archivers/unpackerr/pkg-descr @@ -0,0 +1,5 @@ +Unpackerr is an application that runs on Windows, macOS, Linux, FreeBSD and in +Docker. You can use it to watch a download folder and extract new items. The +more common use is to watch starr apps (radarr, sonarr, readarr, lidarr, +whisparr) and extract items they download. It can do both, at the same time +even. |