Commit e8ad9452 authored by Mark Felder's avatar Mark Felder
Browse files

net-p2p/radarr: Update to 3.2.2.5080

This release is the first to be be built with CoreCLR/.NET which is
superceding the Mono project and future versions (4.x)
of Radarr will only work with the .NET language implementation.

Previously we used binary builds of Radarr and the Mono runtime would
be used to execute the binary. The new .NET implementation doesn't
require a runtime as the compiled binary is natively executable.

Compiling Radarr with Mono was difficult in the past so we shipped the
binary and the Mono runtime, but we expect in the future we will be able
to compile Radarr and other similar apps directly with a FreeBSD
supported release of .NET.

I am also releasing myself as maintainer as we have several suitable and
motivated people keeping up with these latest developments and I don't
want to continue to block progress.

PR:	259194
parent 0d1d216c
PORTNAME= radarr
PORTVERSION= 3.2.2.5080
DISTVERSIONPREFIX=v
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= net-p2p
MASTER_SITES= https://github.com/Radarr/Radarr/releases/download/v${PORTVERSION}/
DISTNAME= Radarr.master.${PORTVERSION}.linux
DISTNAME= Radarr.master.${PORTVERSION}.freebsd-core-x64
MAINTAINER= feld@FreeBSD.org
MAINTAINER= ports@FreeBSD.org
COMMENT= Movie Library Manager for Usenet and BitTorrent users
LICENSE= GPLv3
LIB_DEPENDS= libcurl.so:ftp/curl
RUN_DEPENDS= mediainfo>0:multimedia/mediainfo \
sqlite3>0:databases/sqlite3 \
mono6.8>0:lang/mono6.8
# See https://github.com/Radarr/Radarr/issues/6668 for x86 support
ONLY_FOR_ARCHS= amd64
USE_RC_SUBR= radarr
RUN_DEPENDS= ca_root_nss>0:security/ca_root_nss \
icu>0:devel/icu \
libiconv>0:converters/libiconv \
libinotify>0:devel/libinotify \
libunwind>0:devel/libunwind \
mediainfo>0:multimedia/mediainfo \
openssl>0:security/openssl \
sqlite3>0:databases/sqlite3
NO_ARCH= YES
NO_BUILD= YES
USE_RC_SUBR= ${PORTNAME}
WRKSRC= ${WRKDIR}/Radarr
NO_BUILD= YES
USERS= radarr
GROUPS= radarr
SUB_FILES= ${PORTNAME} pkg-message
SUB_LIST= DATADIR=${DATADIR} \
GROUPS=${GROUPS} \
PORTNAME=${PORTNAME} \
USERS=${USERS}
OPTIONS_DEFINE= X11
USERS= ${PORTNAME}
GROUPS= ${PORTNAME}
# Permits image resizing
X11_LIB_DEPENDS+=libgdiplus.so:x11-toolkits/libgdiplus
WRKSRC= ${WRKDIR}/Radarr
.include <bsd.port.options.mk>
do-install:
${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR}
cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR}
post-install:
@${FIND} -s ${STAGEDIR}${DATADIR} -not -type d | ${SORT} | \
${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR} "! -name Radarr"
${INSTALL_PROGRAM} ${WRKSRC}/Radarr ${STAGEDIR}/${DATADIR}
.include <bsd.port.mk>
TIMESTAMP = 1633614457
SHA256 (Radarr.master.3.2.2.5080.linux.tar.gz) = 347e1add0751151ecfe9c4b76cb4694f97a78cb98356c8bd91d58755b77a8ed8
SIZE (Radarr.master.3.2.2.5080.linux.tar.gz) = 20982296
TIMESTAMP = 1634327998
SHA256 (Radarr.master.3.2.2.5080.freebsd-core-x64.tar.gz) = d55f19c2f9291cf182193f11b26932771323aecb2cb78273e5930d3292f55d7f
SIZE (Radarr.master.3.2.2.5080.freebsd-core-x64.tar.gz) = 47045006
[
{ type: install
message: <<EOM
%%PORTNAME%% relies on Microsoft dotNET5+ SDK to be built
Microsoft does not have an official version of dotNET for FreeBSD
This package was built with an UNOFFICIAL UNSUPPORTED version of dotNET
If this is something that you do not want, remove this package with
"pkg remove %%PORTNAME%%"
This package installs a service file.
Enable it with "sysrc %%PORTNAME%%_enable=TRUE"
Start it with "service %%PORTNAME%% start".
The service file uses daemon to restart %%PORTNAME%% if it crashes.
The service file will also change the permissions so that the updater works.
If this behavior is unwanted you will need to edit the RC file manually and
remove the daemon and/or the permissions changes.
If you are running this in a jail please set "allow_mlock=1" or similar
for this jail otherwise the program will fail to start
Finally, while the built-in updater will update %%PORTNAME%% it has side-effects:
it breaks the ability of pkg to check for corruption in %%PORTNAME%% files
it breaks the ability of pkg to determine if it has removed files correctly
during "pkg remove %%PORTNAME%%" and also
it breaks the fundamental understanding that updates should be handled only
by the system that put the files there in the first place.
EOM
}
]
#!/bin/sh
#
# Author: Mark Felder <feld@FreeBSD.org>
# PROVIDE: radarr
# REQUIRE: LOGIN
# PROVIDE: %%PORTNAME%%
# REQUIRE: LOGIN network
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable radarr:
# radarr_enable="YES"
#
# Add the following lines to /etc/rc.conf or use sysrc to enable %%PORTNAME%%
# ${%%PORTNAME%%_enable="YES"}
# Optionaly there are some other parameters
# ${%%PORTNAME%%_user="%%USERS%%"}
# ${%%PORTNAME%%_group="%%GROUPS%%"}
# This stores %%PORTNAME%% data (e.g., databases, configs, logs)
# ${%%PORTNAME%%_data_dir="%%PREFIX%%/%%PORTNAME%%"}
# This stores the PID files that daemon will use
# ${%%PORTNAME%%_pid_dir:="/var/run/%%PORTNAME%%"}
. /etc/rc.subr
name="radarr"
rcvar=radarr_enable
name=%%PORTNAME%%
rcvar=%%PORTNAME%%_enable
load_rc_config $name
: ${radarr_enable="NO"}
: ${radarr_user:="radarr"}
: ${radarr_data_dir:="%%PREFIX%%/radarr"}
: ${%%PORTNAME%%_enable:=NO}
: ${%%PORTNAME%%_user:="%%USERS%%"}
: ${%%PORTNAME%%_group:="%%GROUPS%%"}
: ${%%PORTNAME%%_exec_dir:="%%DATADIR%%"}
: ${%%PORTNAME%%_data_dir:="%%PREFIX%%/%%PORTNAME%%"}
: ${%%PORTNAME%%_pid_dir:="/var/run/%%PORTNAME%%"}
pidfile="${radarr_data_dir}/radarr.pid"
procname="%%PREFIX%%/bin/mono"
pidfile="${%%PORTNAME%%_pid_dir}/${name}_daemon.pid"
pidfile_child="${%%PORTNAME%%_pid_dir}/${name}_child.pid"
command="/usr/sbin/daemon"
command_args="-f ${procname} %%DATADIR%%/Radarr.exe --nobrowser --data=${radarr_data_dir}"
start_precmd=radarr_precmd
radarr_precmd()
{
export XDG_CONFIG_HOME=${radarr_data_dir}
if [ ! -d ${radarr_data_dir} ]; then
install -d -o ${radarr_user} ${radarr_data_dir}
fi
start_precmd=${name}_precmd
%%PORTNAME%%_precmd() {
if [ ! -d ${%%PORTNAME%%_data_dir} ]; then
install -d -o ${%%PORTNAME%%_user} -g ${%%PORTNAME%%_group} ${%%PORTNAME%%_data_dir}
fi
if [ ! -d ${%%PORTNAME%%_pid_dir} ]; then
install -d -o ${%%PORTNAME%%_user} -g ${%%PORTNAME%%_group} ${%%PORTNAME%%_pid_dir}
fi
chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} ${%%PORTNAME%%_exec_dir}
# .NET 6+ use dual mode sockets to avoid the separate AF handling.
# disable .NET use of V6 if no ipv6 is configured.
# See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259194#c17
ifconfig | grep -q inet6
if [ $? == 1 ]; then
export DOTNET_SYSTEM_NET_DISABLEIPV6=1
fi
# Unwritable pids allow the service to start, but fails to work
# Rare, but if you are debugging as root and accidentally start the service...
/bin/rm -f ${pidfile}
rc_flags="-r -f -p ${pidfile_child} -P ${pidfile} ${%%PORTNAME%%_exec_dir}/Radarr --data=${%%PORTNAME%%_data_dir} --nobrowser >> /dev/null 2>&1 ${rc_flags}"
}
run_rc_command "$1"
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment