diff --git a/net-p2p/lidarr/Makefile b/net-p2p/lidarr/Makefile --- a/net-p2p/lidarr/Makefile +++ b/net-p2p/lidarr/Makefile @@ -1,26 +1,30 @@ PORTNAME= lidarr -PORTVERSION= 0.8.1.2135 +PORTVERSION= 1.0.2.2592 CATEGORIES= net-p2p MASTER_SITES= https://github.com/lidarr/Lidarr/releases/download/v${PORTVERSION}/ -DISTNAME= Lidarr.master.${PORTVERSION}.linux +DISTNAME= Lidarr.master.${PORTVERSION}.freebsd-core-x64 MAINTAINER= michiel@vanbaak.eu COMMENT= Music collection manager for Usenet and BitTorrent users LICENSE= GPLv3 -LIB_DEPENDS= libcurl.so:ftp/curl -RUN_DEPENDS= chromaprint>0:audio/chromaprint \ - mediainfo>0:multimedia/mediainfo \ - mono6.8>0:lang/mono6.8 \ +# See https://github.com/radarr/radarr/issues/6668 for x86 support +ONLY_FOR_ARCHS= amd64 + +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 \ + chromaprint>0:audio/chromaprint \ sqlite3>0:databases/sqlite3 -USE_RC_SUBR= lidarr +USES= ssl:run -NO_ARCH= YES -NO_BUILD= YES +USE_RC_SUBR= ${PORTNAME} -WRKSRC= ${WRKDIR}/Lidarr +NO_BUILD= YES SUB_FILES= ${PORTNAME} package_info pkg-message SUB_LIST= DATADIR=${DATADIR} \ @@ -30,13 +34,10 @@ PORTNAME=${PORTNAME} \ USERS=${USERS} -USERS= lidarr -GROUPS= lidarr - -OPTIONS_DEFINE= X11 +WRKSRC= ${WRKDIR}/Lidarr -# Permits image resizing -X11_LIB_DEPENDS+=libgdiplus.so:x11-toolkits/libgdiplus +USERS= ${PORTNAME} +GROUPS= ${PORTNAME} .include @@ -45,8 +46,8 @@ do-install: ${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR}/bin/ - cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR}/bin/ "! -name Lidarr.exe" - ${INSTALL_SCRIPT} ${WRKSRC}/Lidarr.exe ${STAGEDIR}/${DATADIR}/bin/ + cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR}/bin/ "! -name Lidarr" + ${INSTALL_PROGRAM} ${WRKSRC}/Lidarr ${STAGEDIR}/${DATADIR}/bin/ post-install: ${INSTALL_DATA} ${WRKDIR}/package_info ${STAGEDIR}/${DATADIR}/ diff --git a/net-p2p/lidarr/distinfo b/net-p2p/lidarr/distinfo --- a/net-p2p/lidarr/distinfo +++ b/net-p2p/lidarr/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1643126158 -SHA256 (Lidarr.master.0.8.1.2135.linux.tar.gz) = 7895fab75f43dac957ebc7d748c77f562c775d280257294af9677c547f63b2e2 -SIZE (Lidarr.master.0.8.1.2135.linux.tar.gz) = 21382130 +TIMESTAMP = 1654505379 +SHA256 (Lidarr.master.1.0.2.2592.freebsd-core-x64.tar.gz) = 21c56d4947af22cae56e31a4e21aedb6ded8f02b8dcd769c1976b8901a615f75 +SIZE (Lidarr.master.1.0.2.2592.freebsd-core-x64.tar.gz) = 48728876 diff --git a/net-p2p/lidarr/files/lidarr.in b/net-p2p/lidarr/files/lidarr.in --- a/net-p2p/lidarr/files/lidarr.in +++ b/net-p2p/lidarr/files/lidarr.in @@ -1,43 +1,54 @@ #!/bin/sh -# -# Author: Michiel van Baak -# PROVIDE: lidarr -# REQUIRE: LOGIN +# PROVIDE: %%PORTNAME%% +# REQUIRE: LOGIN network # KEYWORD: shutdown - -# Add the following lines to /etc/rc.conf to enable lidarr: -# lidarr_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="lidarr" -rcvar=lidarr_enable - +name=%%PORTNAME%% +rcvar=%%PORTNAME%%_enable load_rc_config $name -: ${lidarr_enable="NO"} -: ${lidarr_user:="lidarr"} -: ${lidarr_data_dir:="%%PREFIX%%/lidarr"} -: ${lidarr_exec_dir:="%%DATADIR%%/bin"} +: ${%%PORTNAME%%_enable:=NO} +: ${%%PORTNAME%%_user:="%%USERS%%"} +: ${%%PORTNAME%%_group:="%%GROUPS%%"} +: ${%%PORTNAME%%_exec_dir:="%%DATADIR%%/bin"} +: ${%%PORTNAME%%_data_dir:="%%PREFIX%%/%%PORTNAME%%"} +: ${%%PORTNAME%%_pid_dir:="/var/run/%%PORTNAME%%"} -pidfile="${lidarr_data_dir}/lidarr.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} --debug ${lidarr_exec_dir}/Lidarr.exe --nobrowser --data=${lidarr_data_dir}" -start_precmd=lidarr_precmd - -lidarr_precmd() -{ - export XDG_CONFIG_HOME=${lidarr_data_dir} - if [ ! -d ${lidarr_data_dir} ]; then - install -d -o ${lidarr_user} ${lidarr_data_dir} - 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} +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 + + # .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 + + rc_flags="-r -f -p ${pidfile_child} -P ${pidfile} ${%%PORTNAME%%_exec_dir}/Lidarr --data=${%%PORTNAME%%_data_dir} --nobrowser >> /dev/null 2>&1 ${rc_flags}" } run_rc_command "$1" diff --git a/net-p2p/lidarr/files/pkg-message.in b/net-p2p/lidarr/files/pkg-message.in --- a/net-p2p/lidarr/files/pkg-message.in +++ b/net-p2p/lidarr/files/pkg-message.in @@ -2,6 +2,13 @@ { type: install message: <